Using the Export Import Command Line Interface
This section describes the general usage of the Export Import features from the command prompt.
To run the transporter using the command line interface:
-
Open a command prompt.
-
Navigate to the directory <installroot>\TIDAL\Transporter\bin. Two Transporter command script files are provided: “transcmdline.bat” (Windows) and “transcmdline.sh” (Linux).
-
Run the Transporter command script with the appropriate command and options.
transcmdline[.sh] -T <command> -<option> <variable> [-<option> <variable>] ...
where:
Parameter
Description
transcmdline
Launches the Transporter command script.
-T
Identifies this as a Transporter Task command.
<command>
Identifies what task or command the command line interface has to perform.
[-<option> <variable>]...
Specifies the option and its variable value. Some options are required. Multiple options can be specified. Variables containing special characters or spaces must be surrounded in double quotes.
-
On Windows you might use this command to export a group of jobs:
transcmdline -T exportjob -s MySource -g "\My Job Group" -d "C:\Output\Mar19\Job1"
-
On UNIX, the command name would be transcmdline.sh.
See the Export Import Command Summary below for a list of the export import commands.
Export Import Command Summary
Command |
Use to |
---|---|
exportjob |
Export a job or job group to an export directory. |
exportcal |
Export a job or job group to an export directory. |
importjob |
Import a job or job group to an export directory. |
Validate the mappings, dependencies, etc. in a job, job group prior to import. |
|
Compare an export directory with the destination TA system. |
|
importcal |
Import a job, job group, or delta data set to TA system. |
Validate the mappings, dependencies, etc. in a job or job group prior to import. |
|
Compare an export directory with the destination TA system. |
|
delta |
Create a delta directory that contains only the differences between two export versions. |
deletejob |
Delete a job or job group. |
deletecal |
Delete a calendar. |
How to Perform Typical Tasks with the Command Line Interface
This section describes the commands you need to issue to perform the typical export import tasks.
EXPORT – To export jobs, job groups or calendars:
-
Run the exportjob or exportcal command.
IMPORT – To import jobs, job groups or calendars:
-
Run the importjob or importcal command.
DELTA – To create and import the delta between two systems:
-
Run the export command for version 1.
-
Run the export command for version 2.
-
Run the delta command for version 1 and version 2.
-
Run the import command for the destination TA that matches version 1.
COMPARE – To compare exported data with a destination TA:
-
Run the export command.
-
Run the import command with the -CO option.
VALIDATE – To validate the data to be imported data into a destination TA:
-
Run the export command.
-
Run the import command with the -VT option.
DELETE – To delete data from a destination TA
-
Run the deletejob or deletecal command.
Exporting Jobs and Job Groups
You use this command and parameters with the Transporter to export a job, job group, or selection file containing job data to your file system.
$ transcmdline[.sh] -T exportjob [-a <job-alias> | -g <job-group-name> | -i <selection-file>] -s <source--name> -d <destination-directory-name>
Options:
-
-T exportjob – Indicate that the transcmdline tool is going to export job data to a file rather than work as a transporter.‘-T’ stands for Task. Required.
-
-a <job-alias> – Specify the job to be exported.
-
-g <job-group-name> – Specify the job group to be exported.
-
-i <selection-file> – Use this option to export multiple jobs and job groups saved in a selection file. The selection file must already have been created using the Transporter. See Saving the Job or Job Group Object Selections for information about selection files.
-
-s <source--name> – Specify the file name containing the source system details. Required except if using a selection file.
Note: If you are using a selection file, you do not need to use the "-s" option as the option is already specified in the selection file (unless you wish to override the parameter value).
-
-d <destination-directory-name> – Specify the name of the directory in which the files containing exported data should be placed. Required.
-
-IR – Export indirectly related artifacts. Using this option causes the export of additional artifacts that are not directly related to the exported jobs.
At least one of these options must be specified: -a, -g, or -i.
Example: Export a job group: transcmdline[.sh] -T exportjob -s MySource -g "\Delta Import" -d "C:\Output\Mar19\Job1"
Example: Export a selection file: transcmdline[.sh] -T exportjob -i "C:\Jobsel.xpr" -d "C:\Output\Mar19\Job2"
Note: Child jobs or job groups are recursively fetched by default (as complete data should be present at the time of import).
Exporting Calendars
You use the command and parameters with the Transporter to export a calendar or selection file containing calendar data to your file system.
$ transcmdline[.sh] -T exportcal [-c <calendar-name> | -i <selection-file>] -s <source--name> -d <destination-directory-name>
Options:
-
-T exportcal – Indicate that the transcmdline tool is going to export calendar data to a file rather than work as a transporter. ‘-T’ stands for Task. Required.
-
-c <calendar-name> – Specify the calendar name to be exported.
-
-i <selection-file> – Use this option to export multiple calendars saved in a selection file. The selection file must already have been created using the Transporter. See Saving the Job or Job Group Object Selections for information about selection files.
-
-s <source--name> – Specify the file name containing the source system details. Required except if using a selection file.
-
-d <destination-directory-name> – Specify the name of the directory in which the files containing exported data should be placed. Required except if using a selection file.
Note: If you are using a selection file, you do not need to use the "-s" and "-d" options as the options are already specified in the selection file (unless you wish to override the parameter values).
At least one of these options must be specified: -c or -i.
Example: Export a calendar: transcmdline[.sh] -T exportcal -s MySource -c "\Daylight Savings" -d "C:\Output\Mar19\Cas1"
Creating a Delta Data Set
You use the command and parameters with the Transporter to create a delta directory that contains the differences between newer and older export files. The delta data set in the delta directory can then be imported as described in
$ transcmdline[.sh] -T delta -s <export-directory-V1> -d <export-directory-V2> -o <output-directory-name>
Options:
-
-T delta – Indicate that the transcmdline tool is going to create a delta file rather than work as a transporter. ‘-T’ stands for Task. Required.
-
-s <export-directory-V2> – Specify the name of the directory that contains files from a newer export operation. Required.
-
-d <export-directory-V1> – Specify the name of the directory that contains files from an older export operation. Required.
-
-o <output-directory-name> – Specify the name of the output directory in which the result of the delta process is to be output. Required.
Example: Create and export the delta between newer and older export files: transcmdline[.sh] -T delta -s "C:\Output\Mar20\Job2" -d "C:\Output\Mar15\Job1" -o "C:\Output\Mar19\Job3"
Importing Jobs, Job Groups, or Delta Data Sets
You use the command and parameters with the Transporter to import jobs or job groups that were previously exported. You also use this command to import delta data that was previously created. You can import full data sets or specify individual jobs, job groups, or calendars. Before doing any import, you must export the data from the source system.
A delta data set might show that an object has to be deleted. However importing such a delta data set does not result in deletion of an object in the destination machine. The import process only creates new objects or updates existing ones.
$ transcmdline[.sh] -T importjob -s <source-directory-name> -d <destination--name> [-a <job-alias> | -g <job-group-name> | -i <selection-file>] -m <map-file>
Options:
-
-T importjob – Indicate that the transcmdline tool is going to import job data from a file rather than work as a transporter.‘-T’ stands for Task. Required.
-
-s <source-directory-name> – Specify the name of the directory in which the files containing exported data reside. Required except if using a selection file.
-
-d <destination--name> – Specify the file name containing the destination system details. Required except if using a selection file.
Note: If you are using a selection file, you do not need to use the "-s" and "-d" options as the options are already specified in the selection file (unless you wish to override the parameter values).
-
-a <job-alias> – Specify the job to be imported.
-
-g <job-group-name> – Specify the job group to be imported.
-
-i <selection-file> – Use this option to import multiple jobs and job groups saved in a selection file. The selection file must have been created using the Transporter. See Saving the Job or Job Group Object Selections for information about selection files.
-
-ef <exclusion-file> – Use this option to exclude multiple jobs and job groups saved in a selection file during import process. The exclusion file must already have been created using the Transporter. See Excluding the Job or Job Group Object Selections for information about excluding files.
-
-m <map-file> – Specify the name of the map file used to resolve static data differences. Required except when using a selection file. A map file must have been created and saved using the Transporter utility. See Mapping Data Objects in the TA Transporter User Guide.
Additional optional parameters; use where applicable depending on the exported data you are importing:
-
-D – Disables the jobs that are copied to the destination. The jobs need to be manually enabled before they can be run.
-
-S – Automatically copies all predecessors of the selected jobs as well.
-
-A – Annotates the Notes tab of a job or job group definition that the object or job or group was copied from another source.
-
-X – Excludes duplicates. Does not copy a job or job group already present in the destination.
-
-SP – If a job selected for copying is a child job then all of the parent job groups it belongs to are also automatically selected for copying.
-
-SC – If a job selected for copying is a parent job then all of its child jobs are also automatically selected for copying.
-
-C – Compiler option. Valid values are :
-
OFF (No Compile) – The changes are not applied until the next time the schedule is compiled. The changes do not apply to the schedule currently running (including the future days already compiled).
-
NOW (Compile – Repeats Start Now) – The changes are applied to the schedule currently running. Any changes that apply to the repeating jobs within the current day's schedule take effect when the schedule is recompiled. This is the same as selecting the Start today's repeating job(s) now option that is in the Effective Date dialog displayed in the Tidal Automation Web client whenever adding a repeating job with an associated calendar date belonging to the current production schedule.
-
SKIP (Compile – Skip Repeats) – The changes are applied to the schedule currently running. Instances of repeating jobs are skipped if they would have run prior to the current time.
-
-
-E – <yyyyMMdd> where yyyyMMdd is the date format of the effective date for the compile).
-
-I – Ignore conflicts. Allows an import despite missing dependencies in the destination.
-
-m – The name of the map file. Required if a selection file was not used when the data was exported. If the source data was exported using a selection file, the mapping information is already included in the data set.
-
-IB – Use this option to include business views in the import.
-
-CD – Use this option to indicate that a delta is being imported.
-
-CO – Use this option to see a “comparison” of the exported files with the destination TA system instead of perform an actual import.
A report file named compareReport.txt is created one of these directories:
Windows: C:\Users\Administrator\.transporter\report\
UNIX: /root/.transporter/report/
-O – Use this option to force update of the relationships with referenced artifacts in the destination during import. Without this option, the relationships with referenced artifacts are not updated during a import and only the job is updated in the destination.
Note: The options -CO, -VT, and -CD are mutually exclusive. The options “-a”, “-g”, “-i” are ignored if either of “-CO”, “-VT”, “-CD” is used. If the options “-a”, “-g”, “-i” are not used, the entire repository is considered for import.
Example: Import all data that was exported to a directory named \Job1:transcmdline[.sh] -T importjob -s "C:\Output\Mar19\Job1" -d MyDest -m "C:\Import.map"
Example: Import a specific job group named MyJobGroup that was exported to the \Job1 directory: transcmdline[.sh] -T importjob -s "C:\Output\Mar19\Job1" -g MyJobGroup -d MyDest -m "C:\Import.map"
-
-VT – Use this option if only an import “validation” is to be done instead of an actual import.
Importing Calendars
You use tру command and parameters with the Transporter to import calendars that were previously exported. Before doing any import, you must export the data from the source system.
$ transcmdline[.sh] -T importcal -s <source-directory-name> -d <destination--name> [-c <calendar-name> | -i <selection-file>]
Options:
-
-T importcal – Indicate that the transcmdline tool is going to import calendar data to a file rather than work as a transporter.‘-T’ stands for Task. Required.
-
-s <source-directory-name> – Specify the name of the directory in which the files containing exported calendar data reside. Required except if using a selection file.
-
-d <destination--name> – Specify the file name containing the destination system details. Required except if using a selection file.
Note: If you are using a selection file, you do not need to use the "-s" and "-d" options as the options are already specified in the selection file (unless you wish to override the parameter values).
-
-c <calendar-name> – Specify the calendar name to be imported.
-
-i <selection-file> – Specify the file that contains names of multiple Calendars to be imported.
-
-m <map-file> – Specify the name of the map file used to resolve static data differences. Required except when using a selection file. A map file must have been created and saved using the Transporter utility. See the Mapping Data Objects.
-
-CD – Use this option to indicate that a delta is being imported.
-
-CO – Use this option to see a “comparison” of the export files with the destination TA system instead of perform an actual import.
A report file named validateReport.txt is created one of these directories:
Windows: C:\Users\Administrator\.transporter\report\
UNIX: /root/.transporter/report/
-
-VT – Use this option if only an import “validation” is to be done instead of an actual import.
Note: The options -CO, -VT, and -CD are mutually exclusive. The options “-c”, “-i” are ignored if either of “-CO”, “-VT”, “-CD” is used. If the options “-c”, “-i” are not used, the entire repository is considered for import.
Example: Importing the calendar objects in the Cal1 directory: transcmdline[.sh] -T importcal -s "C:\Output\Mar19\Cal1" -d MyDest -m "C:\Import.map"
Validating Jobs, Job Groups, or Calendars
You use the command and parameters with the Transporter to validate a job, job group, calendar import prior to performing the actual import. The validation checks for any errors such as mapping and dependency errors. Before doing any import validation, you must export the data from the source system.
The validate operation generates a report file named validateReport.txt in one of these directories:
-
Windows: C:\Users\Administrator\.transporter\report\
-
UNIX: /root/.transporter/report/
An empty report indicates that there no errors with this import. If there are errors, you can use Transporter to correct the mapping file to resolve any mapping errors.
$ transcmdline[.sh] -T [importjob|importcal] -s <source-directory-name> -d <destination--name> -m <map-file> -VT
Options:
-
-T importjob|importcal – Indicate that the transcmdline tool is going to import job or calendar data from a file rather than work as a transporter.‘-T’ stands for Task. Required.
-
-s <source-directory-name> – Specify the name of the directory in which the files containing exported data reside. Required.
-
-d <destination--name> – Specify the file name containing the destination system details. Required.
-
-m <map-file> – Specify the name of the map file used to resolve static data differences. Required except when using a selection file. A map file must have been created and saved using the Transporter utility. See Mapping Data Objects.
-
-VT – Use this option if only an import “validation” is to be done instead of an actual import.
Example: Validating the data that was exported to a directory named \Job1: transcmdline[.sh] -T importjob -s "C:\Output\Mar19\Job1" -d MyDest -m "C:\Import.map" -VT
Comparing Jobs, Job Groups, or Calendars
You use the command and parameters with the Transporter to compare an exported data set with the data in a destination TA system. Before doing any comparison, you must export the data from the source system.
The compare operation generates a report file named compareReport.txt in one of these directories:
-
Windows: C:\Users\Administrator\.transporter\report\
-
UNIX: /root/.transporter/report/
$ transcmdline[.sh] -T [importjob|importcal] -s <source-directory-name> -d <destination--name> -m <map-file> -CO
Options:
-
-T importjob|importcal – Indicate that the transcmdline tool is going to import job or calendar data from a file rather than work as a transporter.‘-T’ stands for Task. Required.
-
-s <source-directory-name> – Specify the name of the directory in which the files containing exported data reside. Required.
-
-d <destination--name> – Specify the file name containing the destination system details. Required.
-
-m <map-file> – Specify the name of the map file used to resolve static data differences. A map file must have been created and saved using the Transporter utility. See Mapping Data Objects.
-
-CO – Use this option to see a “comparison” of the export files with the destination TA system instead of perform an actual import.
A report file named compareReport.txt is created one of these directories:
-
Windows: C:\Users\Administrator\.transporter\report\.
-
UNIX: /root/.transporter/report/
Example: Compare import files in the \Job1 directory with the destination TA and generate a compare report: transcmdline[.sh] -T importjob -s "C:\Output\Mar19\Job1" -d MyDest -m "C:\Import.map" -CO
Note: To specify the name of the multiple job or job groups that need to be excluded from the selection file, use - ef <exclusion-file>.
Example: If you are comparing the job or job groups in the selection file, the jobs saved in the exclusion file will be excluded from the comparison result.
-
Deleting Jobs and Job Groups
When you delete a job or job group, the utility only deletes jobs and direct relationships between jobs and related objects but does not delete the related objects themselves.
Note: Be sure to create a backup of the database before invoking the command to delete a job or job group.
You use the command and parameters with the Transporter to delete a job or job group from a destination system.
$ transcmdline[.sh] -T deletejob [-a <job-alias> | -g <job-group-name> ] -d <destination--name>
Options:
-
-T deletejob – Indicate that the transcmdline tool is going to delete job data rather than work as a transporter.‘-T’ stands for Task. Required.
-
-d <destination--name> – Specify the file name containing the destination system details. Required.
-
-a <job-alias> – Specify the job to be deleted.
-
-g <job-group-name> – Specify the job group to be deleted.
-
-f – Use this option to avoid a prompt to confirm the delete. At least one of these options must be specified: -a or -g.
Example: Deleting a job group: transcmdline[.sh] -T deletejob -d MyDest -a "\My Old Job" -f
Deleting Calendars
When you delete a calendar, the calendar and its relationship with child and condition calendars are removed. When the command to delete a calendar is invoked, the utility only deletes calendars if the calendars are not associated with any other entity.
Note: Be sure to create a backup of the database before invoking the command to delete a calendar.
You use the command and parameters with the Transporter to delete a calendar from a destination system.
$ transcmdline[.sh] -T deletecal -d <destination--name> -c <calendar-name>
Options:
-
-T deletecal – Indicate that the transcmdline tool is going to delete calendar data rather than work as a transporter.‘-T’ stands for Task. Required.
-
-d <destination--name> – Specify the file name containing the destination system details. Required.
-
-c <calendar-name> – Specify the calendar to be deleted. Required.
-
-f – Use this option to avoid a prompt to confirm the delete.
Example: Deleting a calendar: transcmdline[.sh] -T deletecal -d MyDest -c "\My Alarm Calendar" -f