Chapter 1
Command Line Interface (CLI) CallsIntroduction
This chapter describes the Command Line Interface (CLI) calls that you can use to create, edit, view, and delete resellers, sites, or users on the Ensim Pro 4.0.1 for Windows 2003 server. You can also use the CLI calls to export and import site information. Instead of logging on to the Ensim Pro 4.0.1 control panel to run the functions described above, these calls can be executed directly from the command line.
For simplicity, we refer to Ensim Pro 4.0.1 for Windows 2003 as “Ensim Pro” throughout this document.
Topics in this guide include:
How to execute CLI calls
This section includes instructions on how to use the CLI calls directly from the command line.
To execute CLI calls:
- Use a Terminal Services Client like Remote Desktop Connection to start a session on a Microsoft® Windows 2003 server running Ensim Pro.
- In your terminal services session, open a command prompt window, then change to the directory where the CLI program files are located. For example, if you have installed Ensim Pro in the default Program Files directory, then run the following command at the prompt.
cd C:\Program Files\Ensim\WEBppliance\cli
- Since all the arguments passed to the calls are in XML (eXtensible Markup Language) format, create an XML file using a standard text editor. This file will include all the arguments necessary for executing the call successfully.
You have two options available with each call: the “-f” (file) option and the “-s” (string) option. These two options are mutually exclusive, so you can use either one. The “-f” option allows you to specify the complete path where the XML file is located, while the “-s” option allows you to enter the XML data as a string.
We recommend that you create the XML file, save it, then use the “-f” option of the call to specify the location of this file. If you use the “-s” option, you cannot use line breaks in the file, and the entire XML data must be on a single line.
- Run the calls with the parameters described in this guide and the results will be displayed accordingly.
Each call described in this guide includes an example of the XML file it needs to execute. Do not change the format of the XML file while creating it. You can replace the values of the parameters given in these examples.
If the values passed in the XML file are invalid, then the call fails with an error.
Overview of Command Line Interface (CLI) calls
This section describes the various calls that you can use to create, edit, view, and delete resellers, sites, or users directly from the command line. It also describes the calls to export and import site information. The six calls available in the cli directory are as follows:
- addobj.exe: Adds an object such as a reseller, a site or a user to the Ensim Pro database.
- DeleteObj.exe: Deletes an object from the Ensim Pro database.
- GetInfoObj.exe: Displays the configuration of an object.
- UpdateObj.exe: Updates the information for an object.
- ExportObj.exe: Exports the site information from the Ensim Pro control panel to a directory on the same server.
- ImportObj.exe: Imports the site information from its export directory to the Ensim Pro control panel.
The syntax for executing the above calls is similar, and is as follows:
- When the arguments are passed in the form of an XML file:
<call name> -t <org / reseller / user / usertemplate> -f <location_of_XML_file> -u <username> -p <password>
To view the information of a reseller, run the following command using the “-f” option.
GetInfoObj.exe -t reseller -f C:\wwpcli\xml\getresellerinfo.xml -u admin -p ensimpro
where getresellerinfo.xml is an XML file containing all the parameters required to execute GetInfoObj.exe and located in the C:\wwpcli\xml directory.
- When the arguments are passed in the form of a string containing XML data:
<call name> -t <org / reseller / user / usertemplate> -s <XML_data_as_a_string> -u <username> -p <password>
To view the information for a reseller “res1.com“, run the following command using the “-s” option.
GetInfoObj.exe -t reseller -s "<?xml version='1.0' encoding='utf-8' ?><reseller><property name='Name'>res1.com</property><property name='ShortName'>res1sn</property></reseller>" -u admin -p ensimpro
where the string <?xml version='1.0' encoding='utf-8' ?><reseller><property name='Name'>res1.com</property><property name='ShortName'>res1sn</property></reseller> contains all the parameters required to execute GetInfoObj.exe in XML format. Please note that the string is enclosed in double quotes (") and the tag values in single quotes (').Adding an object
Call Name: addobj.exe
Description: Adds an object such as a reseller, a site, a user template, or a user to Ensim Pro.
Before executing this call for a reseller or a site, the Ensim Pro control panel must contain a template for adding a new reseller or site. If a template does not exist, you must create a new template using the Ensim Pro control panel. For instructions on creating a new template, please refer to the online Help available in the Ensim Pro control panel by clicking General Help in the Help section on the left navigation panel.
Adding a reseller
Syntax:
- When the arguments are passed in the form of an XML file:
addobj.exe -t reseller -f <location_of_XML_file> -u <username> -p <password>
- When the arguments are passed in the form of a string containing XML data:
addobj.exe -t reseller -s <XML_data_as_a_string> -u <username> -p <password>
Arguments:
The parameters to be passed in the XML file for adding a reseller are given below.
<?xml version="1.0" encoding="utf-8" ?>
<reseller>
<generalinfo>
<property name="DisplayName">
res1name
</property>
<property name="Name">
res1.com</property>
<property name="ShortName">
res1sn</property>
<property name="TemplateName">
resellerplan</property>
<property name="ContactPhone">
12345678</property>
<property name="ContactEmail">
abc@example.org</property>
</generalinfo>
<admin>
<property name="FullName">
Administrator</property>
<property name="UserName">
admin</property>
<property name="Password">
ensimpro</property>
<property name="Email">
xyz@example.org</property>
</admin>
</reseller>
Adding a site
Syntax:
- When the arguments are passed in the form of an XML file:
addobj.exe -t org -f <location_of_XML_file> -u <username> -p <password>
- When the arguments are passed in the form of a string containing XML data:
addobj.exe -t org -s <XML_data_as_a_string> -u <username> -p <password>
Arguments:
The parameters to be passed in the XML file for adding a site are given below.
<?xml version="1.0" encoding="utf-8" ?>
<org>
<generalinfo>
<property name="DisplayName">
site1 name</property>
<property name="Name">
site1.com</property>
<property name="ShortName">
site1sn</property>
<property name="TemplateName">
test</property>
<property name="ContactEmail">
abc@example.org</property>
</generalinfo>
<admin>
<property name="DisplayName">
Administrator</property>
<property name="UserName">
admin</property>
<property name="Password">
ensimpro</property>
<property name="Email">
xyz@example.org</property>
</admin>
<service name="WebHosting" version="2.0.0">
<property name="Type">
ipbased</property>
<!-- Type can be either "namebased" or "ipbased". -->
<property name="IPSelection">
XX.XX.XX.XX</property>
<!-- IPSelection is only used in case of IP-based sites. The value can either be "auto" for automatic IP address selection or the IP address. Do not include this parameter if you are adding a name-based site. -->
</service>
</org>
Adding a user template
Syntax:
- When the arguments are passed in the form of an XML file:
addobj.exe -t usertemplate -f <location_of_XML_file> -u <username> -p <password>
- When the arguments are passed in the form of a string containing XML data:
addobj.exe -t usertemplate -s <XML_data_as_a_string> -u <username> -p <password>
Arguments:
The parameters to be passed in the XML file for adding a user template are given below. Please refer Description of parameters used for creating a user template and updating a user for a detailed description of some of the parameters given below.
<?xml version="1.0" encoding="utf-8" ?>
<template>
<generalinfo>
<property name="name">
test</property>
<property name="description">
Template added using cli</property>
<property name="enabled">
true</property>
<property name="shortname">
site1sn</property>
<!-- shortname refers to the short name of the site to which this user template needs to be added. -->
</generalinfo>
<service name="WebHosting" version="2.0.0">
<ServiceComponent name="w3svc" version="2.0.0" enabled="1">
</ServiceComponent>
<ServiceComponent name="msftpsvc" version="2.0.0" enabled="1">
<property name="IISPermRead" type="System.boolean">
true</property>
<property name="IISPermWrite" type="System.boolean">
false</property>
<property name="UserLog" type="System.boolean">
true</property>
<property name="ContentUploader" type="System.boolean">
false</property>
</ServiceComponent>
<ServiceComponent name="frontpage" version="2.0.0" enabled="1">
<property name="ContentUploader" type="System.boolean">
false</property>
</ServiceComponent>
<ServiceComponent name="mail" version="1.5.0" enabled="1">
<property name="UserEnableWebAccess" type="System.boolean">
false</property>
<property name="UserEnableForwards" type="System.boolean">
false</property>
<property name="UserEnableAutoresponders" type="System.boolean">
false</property>
</ServiceComponent>
</service>
</template>
Description of parameters used for creating a user template and updating a user
This section describes some of the parameters that are included in the XML files and passed to addobj.exe for creating a user template, and UpdateObj.exe for updating a user. Table 1-1 describes the parameters included in the ServiceComponent sections used in the XML files.
Adding a user
Syntax:
- When the arguments are passed in the form of an XML file:
addobj.exe -t user -f <location_of_XML_file> -u <username> -p <password>
- When the arguments are passed in the form of a string containing XML data:
addobj.exe -t user -s <XML_data_as_a_string> -u <username> -p <password>
Arguments:
The parameters to be passed in the XML file for adding a user are given below.
The parameters that do not have a value specified below are optional, and therefore these tags can have empty values.
<?xml version="1.0" encoding="utf-8" ?>
<user>
<property name="username">
user1</property>
<property name="password">
ensimpro</property>
<property name="template">
test</property>
<property name="firstname"></property>
<property name="middlename"></property>
<property name="lastname"></property>
<property name="admin"></property>
<property name="email"></property>
<property name="phone"></property>
<property name="description"></property>
<property name="enabled">
true</property>
<property name="street"></property>
<property name="city"></property>
<property name="state"></property>
<property name="country"></property>
<!-- country should include the two-character alphabetic country code. For example, if you want to set country to United States, then specify US as its value. -->
<property name="company"></property>
<property name="department"></property>
<property name="office"></property>
<property name="shortname">
site1sn</property>
<!-- shortname refers to the short name of the site to which this user needs to be added. -->
</user>
Deleting an object
Call Name: DeleteObj.exe
Description: Deletes an object such as a reseller, a site, a user template, or a user.
Deleting a reseller
Syntax:
- When the arguments are passed in the form of an XML file:
DeleteObj.exe -t reseller -f <location_of_XML_file> -u <username> -p <password>
- When the arguments are passed in the form of a string containing XML data:
DeleteObj.exe -t reseller -s <XML_data_as_a_string> -u <username> -p <password>
Arguments:
The parameters to be passed in the XML file for deleting a reseller are given below.
<?xml version="1.0" encoding="utf-8" ?>
<reseller>
<property name="Name">
res1.com</property>
<property name="ShortName">
res1sn</property>
</reseller>
Deleting a site
Syntax:
- When the arguments are passed in the form of an XML file:
DeleteObj.exe -t org -f <location_of_XML_file> -u <username> -p <password>
- When the arguments are passed in the form of a string containing XML data:
DeleteObj.exe -t org -s <XML_data_as_a_string> -u <username> -p <password>
Arguments:
The parameters to be passed in the XML file for deleting a site are given below.
<?xml version="1.0" encoding="utf-8" ?>
<org>
<property name="Name">
site1.com</property>
<property name="ShortName">
site1sn</property>
</org>
Deleting a user template
Syntax:
- When the arguments are passed in the form of an XML file:
DeleteObj.exe -t usertemplate -f <location_of_XML_file> -u <username> -p <password>
- When the arguments are passed in the form of a string containing XML data:
DeleteObj.exe -t usertemplate -s <XML_data_as_a_string> -u <username> -p <password>
Arguments:
The parameters to be passed in the XML file for deleting a user template are given below.
<?xml version="1.0" encoding="utf-8" ?>
<template>
<property name="name">
test</property>
</template>
Deleting a user
Syntax:
- When the arguments are passed in the form of an XML file:
DeleteObj.exe -t user -f <location_of_XML_file> -u <username> -p <password>
- When the arguments are passed in the form of a string containing XML data:
DeleteObj.exe -t user -s <XML_data_as_a_string> -u <username> -p <password>
Arguments:
The parameters to be passed in the XML file for deleting a user are given below.
<?xml version="1.0" encoding="utf-8" ?>
<user>
<property name="name">
user1@site1sn</property>
</user>
Displaying the information of an object
Call Name: GetInfoObj.exe
Description: Displays the information of an object such as a reseller, or a site
Displaying the information of a reseller
Syntax:
- When the arguments are passed in the form of an XML file:
GetInfoObj.exe -t reseller -f <location_of_XML_file> -u <username> -p <password>
- When the arguments are passed in the form of a string containing XML data:
GetInfoObj.exe -t reseller -s <XML_data_as_a_string> -u <username> -p <password>
Arguments:
The parameters to be passed in the XML file for displaying the information of a reseller are given below.
<?xml version="1.0" encoding="utf-8" ?>
<reseller>
<property name="Name">
res1.com</property>
<property name="ShortName">
res1sn</property>
</reseller>
Displaying the information of a site
Syntax:
- When the arguments are passed in the form of an XML file:
GetInfoObj.exe -t org -f <location_of_XML_file> -u <username> -p <password>
- When the arguments are passed in the form of a string containing XML data:
GetInfoObj.exe -t org -s <XML_data_as_a_string> -u <username> -p <password>
Arguments:
The parameters to be passed in the XML file for displaying the information of a site are given below.
<?xml version="1.0" encoding="utf-8" ?>
<org>
<property name="Name">
site1.com</property>
<property name="ShortName">
site1sn</property>
</org>
Updating the information of an object
Call Name: UpdateObj.exe
Description: Updates the information of an object such as a reseller, a site, or a user.
Updating the information of a reseller
Syntax:
- When the arguments are passed in the form of an XML file:
UpdateObj.exe -t reseller -f <location_of_XML_file> -u <username> -p <password>
- When the arguments are passed in the form of a string containing XML data:
UpdateObj.exe -t reseller -s <XML_data_as_a_string> -u <username> -p <password>
Arguments:
The parameters to be passed in the XML file for updating the information of a reseller are given below.
<?xml version="1.0" encoding="utf-8" ?>
<reseller>
<generalinfo>
<property name="DisplayName">
res1 name</property>
<property name="ContactName">
res1</property>
<property name="ShortName">
res1sn</property>
<property name="ContactPhone">
12345678</property>
<property name="ContactEmail">
abc@example.org</property>
</generalinfo>
<service add="0">
<!-- If the add flag is equal to "0", then the quota defined below is decreased by the value specified. If the flag is equal to "1", then the quota is increased by the value specified. --><!-- If you want to set the value of a quota as unlimited, then the value of that quota should be set to "-1" and the add flag set to "1". If a quota has unlimited value, and you want to remove it, then set the value of the quota to "-1" and the add flag to "0".-->
<property quota="Disk Space">
0</property>
<property quota="Number of Installations of MSDE">
0</property>
<property quota="Number of Installations of mysql">
1</property>
<property quota="Number of Installations of w3svc">
2</property>
<property quota="Number of Installations of webalizer">
3</property>
<property quota="Bandwidth">
0</property>
<property quota="Number of Installations of Power Tools">
4</property>
<property quota="Number of Installations of frontpage">
0</property>
<property quota="# of Access DSNs">
5</property>
<property quota="Number of Installations of msftpsvc">
0</property>
<property quota="Number of Installations of php">
4</property>
<property quota="# of SubDomains">
3</property>
<property quota="# of DNS Zones">
2</property>
<property quota="Number of Installations of perl">
1</property>
<property quota="# of SQL DSNs">
0</property>
<property quota="Number of Users">
0</property>
<property quota="Number of Installations of odbc">
0</property>
<property quota="Number of Installations of Coldfusion">
0</property>
<property quota="Number of Installations of filemanager">
0</property>
<property quota="Instances of DNS">
5</property>
</service>
</reseller>
Updating the information of a site
Syntax:
- When the arguments are passed in the form of an XML file:
UpdateObj.exe -t org -f <location_of_XML_file> -u <username> -p <password>
- When the arguments are passed in the form of a string containing XML data:
UpdateObj.exe -t org -s <XML_data_as_a_string> -u <username> -p <password>
Arguments:
The parameters to be passed in the XML file for updating the information of a site are given below. Please refer Description of parameters used for updating a site for a detailed description of some of the parameters given below.
<?xml version="1.0" encoding="utf-8" ?>
<org>
<generalinfo>
<property name="DisplayName">
site1 name</property>
<property name="ContactName">
site1</property>
<property name="ShortName">
site1sn</property>
<property name="ContactPhone">
12345678</property>
<property name="ContactEmail">
abc@example.org</property>
</generalinfo>
<admin>
<property name="DisplayName">
Administrator</property>
<property name="UserName">
admin</property>
<property name="Password">
ensimpro</property>
<property name="Email">
xyz@example.org</property>
</admin>
<service name="WebHosting" version="2.0.0">
<generalinfo>
<property name="IsIpbased" type="System.boolean">
false</property>
<property name="IPSelection" type="System.boolean">
false</property>
<property name="ip" type="string">
XX.XX.XX.XX</property>
<!-- For a name-based site, the above parameter should contain the IP address of that site. -->
<property name="BandwidthQuota" type="System.Int32">
11</property>
<property name="BillingCycleStartDay" type="System.Int32">
11</property>
<property name="BandwidthActionSendMail" type="System.boolean">
false</property>
<property name="BandwidthCapped" type="System.boolean">
true</property>
<property name="DiskQuota" type="System.Int32">
110</property>
<property name="MaxUsers" type="System.Int64">
6</property>
</generalinfo>
<ServiceComponent name="msdns" version="2.0.0" enabled="1">
<!-- If the enabled flag is equal to "1", then the service component is added or updated. If the flag is equal to "0", then the service component is deleted. -->
<property name="NumDNSZones" type="System.double">
1</property>
<property name="AllowSubdomainsOnly" type="System.boolean">
true</property>
<property name="AllowReverseZone" type="System.boolean">
true</property>
</ServiceComponent>
<ServiceComponent name="msftpsvc" version="2.0.0" enabled="1">
<property name="UserIsolationMode" type="System.Int32">
0</property>
<property name="AnonymousConnections" type="System.boolean">
false</property>
<property name="MaxConnections" type="System.Int64">
1000</property>
<property name="Timeout" type="System.Uint32">
800</property>
<property name="SiteLogs" type="System.boolean">
true</property>
<property name="LogType" type="String">
W3C Extended Log File Format</property>
<property name="FtpPort" type="System.Int32">
1000X</property>
<!-- Do not include this parameter if you are updating an IP-based site.
For more details about this parameter, please refer FtpPort in Description of parameters used for updating a site. -->
<property name="IISPermRead" type="System.boolean">
true</property>
<property name="IISPermWrite" type="System.boolean">
false</property>
<property name="MessageWelcome" type="String">
Welcome to our site</property>
<property name="MessageExit" type="String">
Thank you for visiting our site</property>
<property name="MessageMaxClients" type="String">
There are too many users logged into our site. Please try later</property>
</ServiceComponent>
<ServiceComponent name="filemanager" version="2.0.0" enabled="1"/>
<ServiceComponent name="perl" version="2.0.0" enabled="1"/>
<ServiceComponent name="urchin" version="2.0.0" enabled="1"/>
<ServiceComponent name="webalizer" version="1.0.0" enabled="1"/>
<ServiceComponent name="msde" version="1.5.0" enabled="1"/>
<ServiceComponent name="mysql" version="1.5.0" enabled="1"/>
<ServiceComponent name="coldfusion" version="1.0.0" enabled="1"/>
<ServiceComponent name="w3svc" version="2.0.0" enabled="1">
<property name="EnableDotNet" type="System.boolean">
false</property>
<property name="DefaultSSL" type="System.boolean">
false</property>
<property name="SharedSSL" type="System.boolean">
false</property>
<property name="SharedSSLHost" type="String">
host.example.org</property>
<property name="SSI" type="System.boolean">
true</property>
<property name="HostHeaders" type="System.boolean">
true</property>
<property name="UseAsPDH" type="System.boolean">
false</property>
<property name="MaxSubDomains" type="System.Int32">
10</property>
<property name="LogType" type="String">
W3C Extended Log File Format</property>
<property name="ChangeLogFormat" type="System.boolean">
true</property>
<property name="Timeout" type="System.Int32">
900</property>
<property name="MaxConnections" type="System.Int32">
1000</property>
<property name="Hits" type="System.Int32">
1</property>
<property name="ReverseDNS" type="System.boolean">
false</property>
<property name="EnableBWQuota" type="System.boolean">
false</property>
<property name="BandwidthQuota" type="System.Int32">
1024</property>
<property name="IISPermRead" type="System.boolean">
true</property>
<property name="IISPermWrite" type="System.boolean">
false</property>
<property name="IISPermDirectoryBrowsing" type="System.boolean">
false</property>
<property name="IISPermExec" type="System.Int32">
1</property>
<property name="CPUrl" type="String">
https://example.org/admin</property>
</ServiceComponent>
<ServiceComponent name="frontpage" version="2.0.0" enabled="1">
<property name="EnableAuthoring" type="System.boolean">
true</property>
<property name="RequireSSL" type="System.boolean">
false</property>
<property name="MailSender" type="String">
abc@xyz.com</property>
<property name="MailReplyTo" type="String">
def@xyz.com</property>
<property name="SMTPHost" type="String">
smtp.xyz.com</property>
</ServiceComponent>
<ServiceComponent name="php" version="2.0.0" enabled="1">
<property name="PhpType" type="System.Int32">
1</property>
</ServiceComponent>
<ServiceComponent name="odbc" version="2.0.0" enabled="1">
<property name="TotalSQLDSNCount" type="System.Int32">
5</property>
<property name="TotalAccessDSNCount" type="System.Int32">
5</property>
</ServiceComponent>
<ServiceComponent name="mail" version="1.5.0" enabled="1">
<property name="EnableMailingLists" type="System.boolean">
false</property>
<property name="EnableDomainAliases" type="System.boolean">
false</property>
<property name="EnableDistributionLists" type="System.boolean">
true</property>
<property name="EnableSpamFilters" type="System.boolean">
true</property>
<property name="EnableUserAliases" type="System.boolean">
true</property>
<property name="EnableWebAccess" type="System.boolean">
true</property>
<property name="EnableForwards" type="System.boolean">
true</property>
<property name="EnableAutoresponders" type="System.boolean">
true</property>
</ServiceComponent>
<ServiceComponent name="powertools" version="2.0.0" enabled="1">
<property name="PowerToolList" type="System.Int32[]">
1,2</property>
</ServiceComponent>
</service>
</org>
Description of parameters used for updating a site
This section describes some of the parameters that are included in the XML files and passed to UpdateObj.exe for updating a site. Table 1-2 describes the parameters included in the Service and ServiceComponent sections used in the XML files.
Updating the information of a user
Syntax:
- When the arguments are passed in the form of an XML file:
UpdateObj.exe -t user -f <location_of_XML_file> -u <username> -p <password>
- When the arguments are passed in the form of a string containing XML data:
UpdateObj.exe -t user -s <XML_data_as_a_string> -u <username> -p <password>
Arguments:
The parameters to be passed in the XML file for updating the information of a user are given below. Please refer Description of parameters used for creating a user template and updating a user for a detailed description of some of the parameters given below.
The parameters that do not have a value specified below are optional, and therefore these tags can have empty values.
<?xml version="1.0" encoding="utf-8" ?>
<user>
<generalinfo>
<property name="username">
user1@site1sn</property>
<property name="firstname"></property>
<property name="middlename"></property>
<property name="lastname"></property>
<property name="admin"></property>
<property name="email"></property>
<property name="phone"></property>
<property name="description"></property>
<property name="enabled">
true</property>
<property name="street"></property>
<property name="city"></property>
<property name="state"></property>
<property name="country"></property>
<!-- country should include the two-character alphabetic country code. For example, if you want to set country to United States, then specify US as its value. -->
<property name="company"></property>
<property name="department"></property>
<property name="office"></property>
<property name="shortname">
site1sn</property>
<!-- shortname refers to the short name of the site to which this user needs to be added. -->
</generalinfo>
<service name="WebHosting" version="2.0.0">
<ServiceComponent name="w3svc" version="2.0.0" enabled="1">
</ServiceComponent>
<ServiceComponent name="msftpsvc" version="2.0.0" enabled="1">
<property name="IISPermRead" type="System.boolean">
true</property>
<property name="IISPermWrite" type="System.boolean">
false</property>
<property name="UserLog" type="System.boolean">
true</property>
<property name="ContentUploader" type="System.boolean">
false</property>
</ServiceComponent>
<ServiceComponent name="frontpage" version="2.0.0" enabled="1">
<property name="ContentUploader" type="System.boolean">
false</property>
</ServiceComponent>
<ServiceComponent name="mail" version="1.5.0" enabled="1">
<property name="UserEnableWebAccess" type="System.boolean">
false</property>
<property name="UserEnableForwards" type="System.boolean">
false</property>
<property name="UserEnableAutoresponders" type="System.boolean">
false</property>
</ServiceComponent>
</service>
</user>
Exporting and importing site information
The Export CLI call allows you to capture and store the current state of a site. The Import CLI call allows you to restore a site to the state when it was exported. This feature allows you to restore the original state of a site in case the entire data or a specific service of that site is corrupted.
You can export and import a site with the following options:
- Configuration settings of the site and all its users
- Configuration settings of the site and its default site administrator
- Configuration settings and service-specific data of the site and all its users
- Configuration settings and service-specific data of the site and its default site administrator
The configuration settings of a site refer to the options specified while adding or editing the site. For example, the Total number of zones option in the Microsoft DNS service component.
The service-specific data of a site refers to the options and the files or directories created and managed by the site administrator. For example, the name of the DNS zone created by the site administrator.
You can export and import site information using the ExportObj.exe and ImportObj.exe calls. Both calls use the same XML format for passing the parameters.
Exporting site information
Call Name: ExportObj.exe
Description: Exports the site information from the Ensim Pro control panel to a directory on the same server.
Syntax:
- When the arguments are passed in the form of an XML file:
ExportObj.exe -t org -f <location_of_XML_file> -u <username> -p <password>
- When the arguments are passed in the form of a string containing XML data:
ExportObj.exe -t org -s <XML_data_as_a_string> -u <username> -p <password>
Importing site information
Call Name: ImportObj.exe
Description: Imports the site information from its export directory to the Ensim Pro control panel.
Syntax:
- When the arguments are passed in the form of an XML file:
ImportObj.exe -t org -f <location_of_XML_file> -u <username> -p <password>
- When the arguments are passed in the form of a string containing XML data:
ImportObj.exe -t org -s <XML_data_as_a_string> -u <username> -p <password>
Arguments:
The parameters to be passed in the XML file for exporting or importing the site information are given below.
<?xml version="1.0" encoding="utf-8" ?>
<orglist>
<org name="site1.com">
<property name="ShortName" type="string">
site1sn</property>
<property name="ExportImportPath" type="string">
c:\exportimport</property>
<property name="ConfigOnly" type="System.Boolean">
false</property>
<!-- To export or import only the configuration settings of a site, set the ConfigOnly flag to "true". To export or import both the configuration settings and the service-specific data of a site, set the ConfigOnly flag to "false".-->
<property name="WithAllUsers" type="System.Boolean">
false</property>
<!-- To export or import the information of all users, set the WithAllUsers flag to "true". To export or import the information of only the default site administrator, set the WithAllUsers flag to "false".-->
</org>
</orglist>
Ensim
Corporation www.ensim.com Contact Ensim www.ensim.com/about/contact.html |