Deploying your configuration data in command-line mode
About this task
There may be circumstances under which you want to run or schedule deployment of configuration data without user interface interaction or without viewing the source and target comparison results.
To accomplish this you can deploy your configuration data in command-line mode. When you deploy your data in command-line mode, CDT automatically compares the source and target environments and then deploys the configuration data.
To deploy configuration data in command-line mode:
Procedure
Results
You can also schedule this script to run at any appropriate time.
You can use the following MODE command line options with CDT:
- MODE Deploy—To deploy changes from source to target
database. The various other options available with this MODE argument
are:
- ExportDir <directory>—The specified <directory> will be created, and the results of the comparison are stored in that <directory>.
- ExportPassphrase <password>—The specified password will be used to encrypt supported Import or Export data when exporting results. This is only applicable when ExportDir parameter is passed.
- ImportDir <directory>—The specified <directory> should contain the exported results. Instead of comparing the source and target databases, this export will be loaded. When you pass this argument, the source database properties are not used.
- ImportPassphrase <password>—The specified password will be used to decrypt data from the import files, and it should match the password given to create the export file.
- DoNotSynchronize <Y|N>—If you pass Y, only the comparison the is done; nothing is deployed. By default, exported results are automatically deployed.
For example, if you want to perform comparison and export the comparison results to specific directory. But you do not want to deploy those changes, pass the following arguments:
-MODE Deploy -ExportDir C:\CDT\Reports -DoNotSynchronize Y
If you do not pass the MODE java argument explicitly, CDT uses MODE Deploy option as default.
- MODE CDT2IE—To convert the CDT comparison export
format to the Import or Export file format. The two required parameters
that you need to pass with this MODE argument are:
- InputFile <Path to the
ydkexport.xml
file> - OutputFile <Name of the Import or Export file
to write>
For example:
-MODE CDT2IE -InputFile C:\CDT\ydkexport.xml -OutputFile NewImportFile.xml
- InputFile <Path to the
- MODE IE2CDT—To convert the Import or Export file
format to the CDT comparison file format. The two required parameters
that you need to pass with this MODE argument are:
- InputFile <Name of the Import or Export file to write>
- OutputDir <Path to the directory where the CDT
comparison file should be stored>
For example:
-MODE IE2CDT -InputFile MyImportFile.xml -OutputDir C:\CDT\Reports
- MODE LABELDEPLOY—To deploy audit changes between
two version labels. The two available options with this MODE argument
are:
- FromLabel <Label identifier to start from>
- ToLabel <Label identifier to end with>
For example:
-MODE LABELDEPLOY -FromLabel MyLabel1 -ToLabel MyLabel2