Exporting and Importing Settings (Command Line)
Use the LCSCmd.exe command with the /Config switch to export or import configuration settings at the global, computer and/or pool level. This allows data to be:
- Stored as a backup.
- Used for configuration auditing.
- Exported to or imported from another Enterprise pool.
Before exporting or importing configuration settings, stop the Office Communications Server 2007 R2 services. For details about how to stop the service, see Starting and Stopping Services in the Administering Office Communications Server 2007 R2 documentation.
The syntax for exporting and importing settings is given here.
LCSCmd.exe /Config /Action:{Export | Import} /ConfigFile:<configuration file path> /Level:{Global | Pool | Machine} [/PoolName:<name of Enterprise pool or Standard Edition server to export or import configuration settings to or from>] [/FQDN:<FQDN of the computer to export or import configuration settings to or from>] [/Restore] [/L:<log file path>] [/XML[:{TRUE|FALSE}]] [/?[:{TRUE|FALSE}]]
Such as:
LCSCmd.exe /Config /Action:export /Configfile:c:\pool01.XML /Level:global,pool
Where:
Parameter | Description |
---|---|
/Config |
Exports or imports global, pool and/or computer level configurations. |
/Action |
Takes a string that specifies the action name. Valid action names include Export and Import. |
/ConfigFile |
Specifies the file to which to export configuration or from which to import configuration. You must specify an XML extension. |
/Level |
Specifies the levels of configurations that need to be exported or imported. Multiple, comma-delimited values can be specified. Valid values include Global, Pool, and Machine. |
/PoolName |
If /Level is set to Pool, specifies the name of the pool to which configuration settings need to be exported or from which configuration settings need to be imported. For Standard Edition servers, this is the computer name. If a pool name is not specified, the pool to which the current computer belongs is used. |
/FQDN |
If /Level is set to Machine, specifies the FQDN of the computer to which configuration settings need to be exported or from which configuration settings need to be imported. If an FQDN is not specified, the current computer name is used. |
/Restore |
Specifies the import of configuration data:
|
/L |
Specifies the log file path. If not specified, %TEMP%\<ActionName>[<Date>][<Time>].html is used. To disable logging, use a dash character (-) as the log file name. |
/XML |
Specifies whether the log file to be generated should be in XML format instead of HTML. |
/? |
Shows Help on usage. |
Export Action
The Export action sends specific global, pool, and/or computer level settings to a designated file. The action can be logged as an XML or HTML file and is particularly useful for disaster and data recovery scenarios.
Import Action
The Import action retrieves specific global, pool, and/or computer level settings from a designated file. This procedure is useful to recover lost data, correct an improper configuration, import pretested settings into a production environment, roll back a setting to the last working configuration, or to copy settings from one pool to another. This action can be logged as an XML or HTML file.
If you want to import only specific settings, such as a select set of forest-level settings, youll first need to do a global export. Then before you import the resulting XML file, trim the contents of that file to the desired settings. Be careful when you trim the file to leave all dependent classes; that is, do not remove a class that another class youre keeping is dependent upon.
注意
You can only import settings using settings exported from an Office Communications Server 2007 R2 server. Importing settings from previous versions of Office Communications Server is not supported.