Automating the migration by using the command line
You can run the BMC Helix Data Manager from the command line to automate repetitive commands used during migration.
Use the HDM CLI utility to automate data migration tasks, such as setting migration options, performing discovery of data, migrating data, performing data updates, comparing information between migrations, generating reports, and monitor job execution.
Overview
The following image describes the workflow of the HDM CLI utility:
- BMC Helix Data Manager user creates a configuration (CONFIG) file and an input file.
- The configuration file is used to connect to the system where HDM is installed.
- The input file contains the commands and parameters used to run the migration.
- The user runs the CONFIG file and the input file from the command-line interface (CLI).
- The CLI invokes a Java application that sends REST API calls to the HDM Workbench.
- The HDM Workbench stores the details in the HDM Repository.
- The HDM Engine reads the details from the HDM Repository and performs the and performs the commands specified in the input file.
Before you begin
Ensure that you have already performed the following tasks:
- Install BMC Helix Data Manager on your system. HDM CLI is compatible with BMC Helix Data Manager from version 21.3. See Installing.
- Download the HDM CLI 21.3.xx.zip file required for running the automation. To download the files, see Downloading the installation files.
Running the HDM CLI utility from the command line
Perform the following steps to run the migration from the command line:
Unzip the HDM CLI 21.3.xx.zip file.
The HDM CLI 21.3.xx folder contains the JAR file, CONFIG file and demo scripts.File
Description
hdm_cli-21.3.xx.jar
This JAR file is an executable JAR file.
hdm_cli.cfg
The CONFIG file is used to connect to the HDM Workbench where you want to run the HDM CLI utility. This file contains the HDM URL to connect to and the username fields.
Edit the hdm_cli.cfg file. Enter the appropriate URL, username, and report directory of your HDM system.
Parameter
Example
Description
url
Enter the URL of your HDM system.
username
username=hdm
Enter the username of your HDM system.
report-dir
report-dir=reports
Enter the directory to save the reports.
The default directory selected is reports directory.
We recommend you to keep this value to reports.- Create an input file by using the commands and parameters required for migration. To create an input file and for information on the supported commands, see HDM CLI utility commands.
For example, create an input TXT file with commands and parameters added and name it as script-demo.txt. Run the input file by using the command prompt from the hdm-cli folder.To run a specific migration file, enter the following command in the command prompt:
java -jar <HDM CLI JAR file> -script="<input file>" -pwd=<password>For example,
java -jar hdm_cli.jar -script="demo.txt" -pwd=abc123The command line refreshes at a small interval to show the status of the job. To view the status of the jobs in the UI, navigate to the Jobs & Activities tab in the HDM Workbench.
(Optional) You can also rerun any specific commands from the input file if you face an issue. For example, if you want to run migration from step 5, run the following command:
java -jar hdm_cli.jar -script="demo.txt" -pwd=abc123 -fromStep=5 -stoStep=7
HDM CLI utility commands
Before you run the HDM CLI utility, you must determine the commands for migration in the input file. The syntax for the HDM CLI commands is as follows:
Example of an input file
2 DISCOVERY system:"demo-source"
3 GET-DB-CHARACTERSET system:"demo-source"
4 CONNECTIVITY-TEST system:"demo-source"
5 DISCOVERY system:"demo-source"
6 COPY-MIGRATION-PACK source-migration-pack:"Demo Copy" new-migration-pack:"Demo Copy 3" source-system:"demo-source" target-system:"demo-target"
7 PUBLISH-MIGRATION-PACK migration-pack:"Demo Copy 3"
8 CREATE-MIGRATION-JOB job-name:"Demo Migration Job" source-system:"demo-source" target-system:"demo-target" migration-pack:"Demo Copy 2" migration-set:"Environment - Flat" export-template:"Demo" source-file-system:"DEFAULT" target-file-system:"DEFAULT" threads:5
9 CREATE-IMPORT-JOB migration-job-name:"Demo Migration Job" import-job-name:"Import test 3" import-template:"Default" file-system:"DEFAULT" threads:5
10 CREATE-DATA-UPDATE-JOB data-update-job-name:"Demo Data Update Job" data-update-template:"Data Update Template ITSM 9.1 to 19.08 or above" target-system:"demo-target"
11 RUN-UPDATE-SQL data-update-job-name:"Demo Data Update Job" target-system:"demo-target" update-sql-name:"Update Computed Groups"
You can use the following commands in the input file for migration. The commands are listed in this same topic.
- CONNECTIVITY-TEST command
- DISCOVERY command
- GET-DB-CHARACTERSET command
- CREATE-FILE-SYSTEM
- UPDATE-FILE-SYSTEM
- SCAN-FILE-SYSTEM command
- CREATE-SYSTEM
- UPDATE-SYSTEM
- CREATE-HDM-DB-INTEGRATION command
- DELETE-HDM-DB-INTEGRATION command
- SET-TRIGGER command
- DELETE-SYSTEM command
- SCAN-METADATA-STORE command
- IMPORT-META-DATA command
- EXPORT-META-DATA command
- TEST-EXPORT command
- TEST-IMPORT command
- COPY-MIGRATION-PACK command
- VALIDATE-MIGRATION-PACK command
- ADD-EXCLUDED-FORMS command
- DELETE-EXCLUDED-FORMS command
- PUBLISH-MIGRATION-PACK command
- DELETE-MIGRATION-PACK command
- GET-MIGRATION-PACKS command
- CREATE-MIGRATION-JOB command
- CREATE-IMPORT-JOB command
- CREATE-DELETION-JOB command
- CREATE-REIMPORT-JOB command
- CREATE-DATA-UPDATE command
- RUN-UPDATE-SQL command
- FORM-RECON-REPORT command
- MAP-SOURCE-LOOKUP-FIELDS command
CONNECTIVITY-TEST command
Description
The CONNECTIVITY-TEST command tests the connectivity of the system used for migration.
Syntax
The syntax for the CONNECTIVITY-TEST command is as follows:
where <system-name> is the name of the source system used for migration.
Example
Example output
For more information on how the command works in the HDM Workbench, see Actions you can perform on a system you have registered.
DISCOVERY command
Description
The DISCOVERY command performs the discovery on the system. This command creates a new version and sets the newly discovered version as the current version in HDM.
Syntax
The syntax for the DISCOVERY command is as follows:
where <system-name> is the name of the source system used for migration.
Example
Example output
For more information on how the command works in the HDM Workbench, see Discovering-data-dictionaries.
GET-DB-CHARACTERSET command
Description
The GET-DB-CHARACTERSET command is used to fetch the database characterset for a system and sets the Enabled for migration parameter to true.
Syntax
The syntax for the GET-DB-CHARACTERSET command is as follows:
where <system-name> is the name of the source system used for migration.
Example
Example output
CREATE-FILE-SYSTEM
Description
The CREATE-FILE-SYSTEM command is used to create a new file system with a default file connection. The system parameters contains comma-separated system that can be linked with this file system.
Syntax
The syntax for the CREATE-FILE-SYSTEM command is as follows:
Example
Parameter description
Parameter key | Parameter value | Description |
---|---|---|
Mandatory parameters | ||
file-system | <file-system> | Name of the new file system used for migration. For example, |
protocol | <protocol_name> | Name of the protocol used in the file system. Values can be:
For example, |
Mandatory parameters if protocol = FILE | ||
path | <file_system_path> | Path to the file system. For example, |
Mandatory parameters if protocol = SMB | ||
host-name | <hostname> | Name of the SMB host machine. For example, |
port | <portnumber> | SMB port number to connect to. For example, |
user | <username> | Username of the SMB user. For example, |
password | <password> | Password of the SMB user. For example, |
path | <file_system_path> | Path to the file system. For example, |
Optional parameters | ||
system | <system1,system2> | Determine a comma separated list of systems to link the file system to. For example, |
For more information on how the command works in the HDM Workbench, see Creating-a-file-system.
UPDATE-FILE-SYSTEM
Description
The UPDATE-FILE-SYSTEM command is used to update an existing file system and/or the default file connection and/or link this file system with other systems.
Syntax
The syntax for the UPDATE-FILE-SYSTEM command is as follows:
Example for renaming a file:
Example for updating the file path:
Example for linking the systems:
Parameter description
Parameter key | Parameter value | Description |
---|---|---|
Mandatory parameters | ||
file-system | <file-system> | Name of the new file system used for migration. For example, |
Optional parameters - Use only the parameters you want to update | ||
new-name | <new_name> | New name of the file system. For example, |
protocol | <protocol_name> | Name of the protocol used in the file system. Values can be FILE or SMB. For example, |
Parameters if protocol = FILE | ||
path | <file_system_path> | Path to the file system. For example, |
Parameters if protocol = SMB | ||
host-name | <hostname> | Name of the SMB host machine. For example, |
port | <portnumber> | SMB port number to connect to. For example, |
user | <username> | Username of the SMB user. For example, |
password | <password> | Password of the SMB user. For example, |
Optional parameters | ||
system | <system1,system2> | Determine a comma separated list of systems to link the file system to. For example, |
For more information on how the command works in the HDM Workbench, see Creating-a-file-system.
SCAN-FILE-SYSTEM command
Description
The SCAN-FILE-SYSTEM command is used to scan the file for data packages and store the contents in BMC Helix Data Manager Repository.
Syntax
The syntax for the SCAN-FILE-SYSTEM command is as follows:
where <file_system_name> is the name of the source file system used for migration.
Example
CREATE-SYSTEM
Description
The CREATE-SYSTEM command is used to create and register a new system.
Syntax
The syntax for the CREATE-SYSTEM command is as follows:
Example
Parameter description
Parameter key | Parameter value | Description |
---|---|---|
Mandatory parameters | ||
system | <new_system_name> | Name of the system to be created. For example, system:"src-2002" |
system-type | <type_of_system> | Type of system to be created.Values of the system type can be:
For example, system-type:"Development" |
app-type | <type_of_application> | Type of BMC application for the system.Values can be:
For example, app-type:"Remedy" |
ars-version | <version> | Version of the AR System.For example, ars-version:"21.02" |
location | <location_type> | Location of the system.Values can be:
For example, location:"LOCAL" |
db-type | <database_type> | Type of database. The values can be MS SQL/Oracle/PostgreSQL/Sybase For example, db-type:"Oracle" |
db-address | <db_address> | Address/path of the database. For example. db-address:"vsg" |
db-database-name | <db_database_name> | Name of the database.For example, db-database-name:"ARSystem" |
db-user | <database_username> | Name of the user of the database.For example, db-user:"hdm" |
db-password | <database_password> | Password to connect to the database.For example, db-password:"hdm101" |
Oracle specific parameters | ||
db-schema-name | <database_schema> | Database Schema name of the Oracle database.For example, db-schema-name:"ARSystem" |
db-charset | <db_characterset> | Characterset of the Oracle database.This parameter is required only if the parameter enable-migration=True. For example, db-charset:"abc.bmc.com" |
oracle-service-name-or-sid | <SERVICE_NAME/SID> | Type of database address.Values can be SERVICE_NAME or SID. For example, oracle-service-name-or-sid:"SID" |
db-service-or-sid-name | <db_service_or_sid_name> | DB Service or SID name for Oracle.For example, db-service-or-sid-name:"ORCL" |
db-port | <port_number> | Database port number.Default port number for Oracle is 1521. For example, db-port:1521 |
MS SQL and PostgreSQL specific parameters | ||
db-collation | <db_collation> | Database collation for MS SQL and PostgreSQL.This parameter is required only if the parameter enable-migration=True. For example, db-collation:"SQL_Latin1_General_CP1_CI_AS" |
db-database-name | <db_name> | Database name for MS SQL and PostgreSQL.For example, db-database-name:"ARSystem" |
db-instance-name | <db_instance_name> | Database Instance name for MS SQL and PostgreSQL.For example, db-instance-name:"MSSQLSERVER" |
db-port | <port_number> | Database port number.Default port number for MS SQL is 1433 and for PostgreSQL is 5432. For example, db-port:1433 |
MS SQL specific parameters | ||
mssql-migration-mode | <Bcp/jdbc> | Mode of migration used in the MS SQL database.Values can be Bcp or jdbc. For example, mssql-migration-mode:Bcp |
Additional parameters if Application type (app-type) is Relational database | ||
db-schemas | <logical-schema-name1=physical-schema-name1, logical-schema-name2=physical-schema-name2> | Mapping required for database schemas if you are using a Relational database application type. In a Relational database, the format of db-schemas command is: db-schemas:<logical-schema-name1=physical-schema-name1, logical-schema-name2=physical-schema-name2> For example, db-schemas: "Business=SmartIT_Business,System=SmartIT_System" |
Additional parameters if Application type (app-type) is DWPC or Innovation Studio | ||
db-schema-name | <db_schema_name> | Catalog Physical database name. This parameter maps to the Catalog - Physical Db Name field in the HDM. For example, db-schema-name:"ARSystem" |
db-logical-schema-name | <db_logical_schema_name> | Catalog Logical database name. This parameter maps to the Catalog - Logical Db Name field in the HDM. For example, db-logical-schema-name:"Catalog" |
db-tenant-schema-name | <db_tenant_schema_name> | Tenant Physical database name. This parameter maps to the Tenant - Physical Db Name field in the HDM. For example, db-tenant-schema-name:"arpetramcoewjz0db" |
db-tenant-logical-schema-name | <db_tenant_logical_schema_name> | Tenant Logical database name. This parameter maps to the Tenant - Logical Db Name field in the HDM. For example, db-tenant-logical-schema-name:"Tenant" |
Additional parameters if Application type (app-type) is Remedyforce | ||
rest-url | <URL> | REST URL to connect to Remedyforce. For example, rest-url:"https://test.salesforce.com/services/Soap/u/51.0" |
rest-user | <username> | Username of Remedyforce. For example, rest-user:"rfadmin@rf.com" |
rest-password | <password> | Password of Remedyforce. For example, rest-password:"password" |
rest-namespace | <namespace> | Namespace of Remedyforce. For example, rest-namespace:"BMCServiceDesk" |
rest-add-namespace | <Add_namespace> | Additional namespace of Remedyforce. For example, rest-add-namespace:"BMC ServiceDesk" |
rest-currency | <currency> | Currency used in Remedyforce |
Optional parameters | ||
enable-api | <True/False> | Use this option to enable API for Remedy.Values can be True or False. For example, enable-api:"True" |
enable-migration | <True/False> | Use this option to enable data migration for Remedy.Values can be True or False. For example, enable-migration:"True" |
enable-windows-auth | <True/False> | Use this option to enable Windows authentication for Remedy.Values can be True or False. For example, enable-windows-auth:"True" |
system-props | { 'jdbcURL' : 'jdbc:postgresql: | Use this option to set the JDBC URL to create a JDBC connection string to use an encrypted connection to the database.
For example, system-props:"{ |
Remedy API specific parameters - only if Remedy API is enabled | ||
remedy-addr | <address> | This option is used to specify the network address of the Remedy server.For example, remedy-addr:"remedyserver.company.com" |
remedy-port | <port_number> | Port number of the Remedy system.For example, remedy-port:1234 |
remedy-user | <username> | Username of the Remedy user.For example, remedy-user:Demo |
remedy-password | <password> | Password of the Remedy user. For example, remedy-password:abcd1234 |
For more information on how the command works in the HDM Workbench, see Registering-source-and-target-systems.
UPDATE-SYSTEM
Description
The UPDATE-SYSTEM command is used to update an existing system.
Syntax
The syntax for the UPDATE-SYSTEM command is as follows:
Example
Parameter description
Parameter key | Parameter value | Description |
---|---|---|
Mandatory parameters | ||
system | <new_system_name> | Name of the system to be created. For example, system:"src-2002" |
Optional parameters - Use only the parameters you want to update | ||
system-type | <type_of_system> | Type of system to be created.Values of the system type can be:
For example, system-type:"Development" |
app-type | <type_of_application> | Type of BMC application for the system.Values can be:
For example, app-type:"Remedy" |
ars-version | <version> | Version of the AR System.For example, ars-version:"21.02" |
location | <location_type> | Location of the system.Values can be:
For example, location:"LOCAL" |
db-type | <database_type> | Type of database. The values can be MS SQL/Oracle/PostgreSQL/Sybase For example, db-type:"Oracle" |
db-address | <db_address> | Address/path of the database. For example. db-address:"vsg" |
db-database-name | <db_database_name> | Name of the database.For example, db-database-name:"ARSystem" |
db-user | <database_username> | Name of the user of the database.For example, db-user:"hdm" |
db-password | <database_password> | Password to connect to the database.For example, db-password:"hdm101" |
system-props | { 'jdbcURL' : 'jdbc:postgresql: | Use this option to set the JDBC URL to create a JDBC connection string to use an encrypted connection to the database.
For example, system-props:"{ |
Oracle specific parameters | ||
db-charset | <db_characterset> | Characterset of the Oracle database.This parameter is required only if the parameter enable-migration=True. For example, db-charset:"abc.bmc.com" |
db-schema-name | <database_schema> | Database Schema of the Oracle database.For example, db-schema-name:"ARSystem" |
oracle-service-name-or-sid | <SERVICE_NAME/SID> | Type of database address.Values can be SERVICE_NAME or SID. For example, oracle-service-name-or-sid:"SID" |
db-service-or-sid-name | <db_service_or_sid_name> | DB Service or SID name for Oracle.For example, db-service-or-sid-name:"ORCL" |
db-port | <port_number> | Database port number.Default port number for Oracle is 1521. For example, db-port:1521 |
MS SQL and PostgreSQL specific parameters | ||
db-collation | <db_collation> | Database collation for MS SQL and PostgreSQL.This parameter is required only if the parameter enable-migration=True. For example, db-collation:"SQL_Latin1_General_CP1_CI_AS" |
db-database-name | <db_name> | Database name for MS SQL and PostgreSQL.For example, db-database-name:"ARSystem" |
db-instance-name | <db_instance_name> | Database Instance name for MS SQL and PostgreSQL.For example, db-instance-name:"MSSQLSERVER" |
db-port | <port_number> | Database port number.Default port number for MS SQL is 1433 and for PostgreSQL is 5432. For example, db-port:1433 |
MS SQL specific parameters | ||
mssql-migration-mode | <Bcp/jdbc> | Mode of migration used in the MS SQL database.Values can be Bcp or jdbc. For example, mssql-migration-mode:Bcp |
Additional parameters if Application type (app-type) is Relational database | ||
db-schemas | <logical-schema-name1=physical-schema-name1, logical-schema-name2=physical-schema-name2> | Mapping required for database schemas if you are using a Relational database application type. In a Relational database, the format to write the db-schemas command is: db-schemas:<logical-schema-name1=physical-schema-name1, logical-schema-name2=physical-schema-name2> For example, db-schemas: "Business=SmartIT_Business,System=SmartIT_System" |
Additional parameters if Application type (app-type) is DWPC or Innovation Studio | ||
db-logical-schema-name | <db-logical-schema-name> | Catalog Logical database name. This parameter maps to the Catalog - Logical Db Name field in the HDM. For example, db-logical-schema-name:"Catalog" |
db-tenant-schema-name | <db-tenant-schema-name> | Tenant Physical database name. This parameter maps to the Tenant - Physical Db Name field in the HDM. For example, db-tenant-schema-name:"arpetramcoewjz0db" |
db-tenant-logical-schema-name | <db-tenant-logical-schema-name> | Tenant Logical database name. This parameter maps to the Tenant - Logical Db Name field in the HDM. For example, db-tenant-logical-schema-name:"Tenant" |
Additional parameters if Application type (app-type) is Remedyforce | ||
rest-url | <URL> | REST URL to connect to Remedyforce. For example, |
rest-user | <username> | |
rest-password | <password> | Password of Remedyforce. For example, rest-password:"password" |
rest-namespace | <namespace> | Namespace of Remedyforce. For example, rest-namespace:"BMCServiceDesk" |
rest-add-namespace | <Add_namespace> | Additional namespace of Remedyforce. For example, rest-add-namespace:"BMC ServiceDesk" |
rest-currency | <currency> | Currency used in Remedyforce |
For more information on how the command works in the HDM Workbench, see Registering-source-and-target-systems.
CREATE-HDM-DB-INTEGRATION command
Description
The CREATE-HDM-DB-INTEGRATION command is used to create an HDM user and associated database functions to support discovery and data migration.
Syntax
The syntax for the CREATE-HDM-DB-INTEGRATION command is as follows:
Example
Parameter description
Parameter key | Parameter value | Description |
---|---|---|
system | <system_name> | Name of the system where you want to integrate HDM. Example: system:"Source_20.08_PostgreSQL" |
system-admin-user | <admin_user_name> | Admin username of the system database. Example: system-admin-user:"Postgres_user1" |
system-admin-password | <admin_user_password> | Password for the admin user of the system database. Example: system-admin-password:"Postgres_password1" |
hdm-password | <hdm_user_password> | Password for the HDM user to be created. Example: hdm-password:"hdm_password1" |
For more information on how the command works in the HDM Workbench, see Creating-a-BMC-Helix-Data-Manager-user.
DELETE-HDM-DB-INTEGRATION command
Description
The DELETE-HDM-DB-INTEGRATION command is used to delete an HDM user and associated database integration.
Syntax
The syntax for the DELETE-HDM-DB-INTEGRATION command is as follows:
Example
Parameter description
Parameter key | Parameter value | Description |
---|---|---|
system | <system_name> | Name of the system. Example: system:"Source_20.08_PostgreSQL" |
system-admin-user | <admin_user_name> | Admin username of the system database to be deleted. Example: system-admin-user:"Postgres_user2" |
system-admin-password | <admin_user_password> | Password for the admin user of the system database to be deleted. Example: system-admin-password:"Postgres_password2" |
For more information on how the command works in the HDM Workbench, see Creating-a-BMC-Helix-Data-Manager-user.
SET-TRIGGER command
Description
The SET-TRIGGER command is used to enable or disable triggers for Relational database (Smart IT) system.
If you are migrating BMC Helix ITSM: Smart IT data, you must disable the triggers to disable foreign keys in the target system. After completing the migration, enable the triggers.
Syntax
The syntax for the SET-TRIGGER command is as follows:
Example
Parameter description
Parameter key | Parameter value | Description |
---|---|---|
system | <system_name> | Name of the BMC Helix ITSM: Smart IT system. Example: system:"Source_20.08_PostgreSQL" |
system-admin-user | <admin_user_name> | Admin username of the system database. Example: system-admin-user:"hdm" |
system-admin-password | <admin_user_password> | Password for the admin user of the system database. Example: system-admin-password:"password" |
disable-trigger | true/false | Option to disable trigger. To disable the triggers, set the disable-trigger:"true" To enable the triggers, set the disable-trigger:"false" |
DELETE-SYSTEM command
Description
The DELETE-SYSTEM command is used to delete an existing system.
Syntax
The syntax for the DELETE-SYSTEM command is as follows:
where <system_name> is the name of the system to be deleted.
Example for deleting a system:
SCAN-METADATA-STORE command
Description
The SCAN-METADATA-STORE command is used to scan the metadata files used to perform the migration.
Syntax
The syntax for the SCAN-METADATA-STORE command is as follows:
The SCAN-METADATA-STORE command does not require any parameters to run.
Example:
For more information on how the command works in the HDM Workbench, see Viewing-metadata-files.
IMPORT-META-DATA command
Description
The IMPORT-META-DATA command is used to import the metadata files to the file system used to perform the migration.
Syntax
The syntax for the IMPORT-META-DATA command is as follows:
where <file_name> is the name of the file system used for migration.
Example:
EXPORT-META-DATA command
Description
The EXPORT-META-DATA command is used to export the metadata files from any file system used for migration.
Syntax
The syntax for the EXPORT-META-DATA command is as follows:
Parameter description
Parameter key | Parameter value | Description |
---|---|---|
metadata-name | <metadata_name> | Name of the metadata you want to export. For example, |
metadata-type | EXPORT_DATA_MIGRATION_PACKAGE | Type of metadata. Set the metadata-type value to EXPORT_DATA_MIGRATION_PACKAGE. For example, |
file-name | <file_name> | Name of the file where metadata is exported. For example, |
download | true/false | Set this parameter to true if you want to download the file to the client. For example, |
Example:
TEST-EXPORT command
Description
The TEST-EXPORT command is used to write the test data on the file system.
Syntax
The syntax for the TEST-EXPORT command is as follows:
Example
Parameter description
Parameter key | Parameter value | Description |
---|---|---|
source-system | <source_system_name> | Name of the source system used for migration. For example, |
target-system | <target_system_name> | Name of the target system used for migration. For example, |
source-file-system | <source_system_name> | Name of the source file system used for migration. For example, |
target-file-system | <target_system_name> | Name of the target file system used for migration. For example, |
TEST-IMPORT command
Description
The TEST-IMPORT command is used to import the test data into the target system.
Syntax
The syntax for the TEST-IMPORT command is as follows:
Example
Parameter description
Parameter key | Parameter value | Description |
---|---|---|
source-system | <source_system_name> | Name of the source system used for migration. For example, |
target-system | <target_system_name> | Name of the target system used for migration. For example, |
source-file-system | <source_system_name> | Name of the source file system used for migration. For example, |
target-file-system | <target_system_name> | Name of the target file system used for migration. For example, |
COPY-MIGRATION-PACK command
Description
The COPY-MIGRATION-PACK command copies a Migration Pack with the source-migration-pack name by using the latest discoveries for the system. The status of the pack will be set to DRAFT.
You can also add custom forms to a Migration Pack by using some parameters in the COPY-MIGRATION-PACK command. For more information, see To add custom forms to the migration pack.
Syntax
The syntax for the COPY-MIGRATION-PACK command is as follows:
Example
Parameter description
Parameter key | Parameter value | Description |
---|---|---|
source-migration-pack | <source_pack_name> | Name of the Migration Pack in the source system. For example, |
new-migration-pack | <new_pack_name> | Name of the new Migration Pack. For example, |
source-system | <source_system_name> | Name of the source system used for migration. For example, |
target-system | <target_system_name> | Name of the target system used for migration. For example, |
data-enrichment | <EnrichmentName=FilepathToPickTheCSV> | Parameter used for uploading the Group Mapping sheet for data enrichment. EnrichmentName - Name of the enrichment from the template configuration. FilepathToPickTheCSV - Path to the Group Mapping sheet. |
auto-map-fields | <YES/NO> | Parameter used to determine if the utility should automatically map the field mappings or not. Default value is YES. For example, |
Optional parameters | ||
source-dict | <source-dict-name-time> | Name and timestamp of the source dictionary to use. If not specified, the latest dictionary will be chosen by default. For example, source-dict:"src-2002-9.1.10 (10-Jan-22 11:00:19)" |
target-dict | <target-dict-name-time> | Name and timestamp of the target dictionary to use. If not specified, the latest dictionary will be chosen by default. For example, target-dict:"dst-2102-21.30.00 (04-Jan-22)" |
ref-dict | Values can be:
| Name of the dictionary to be used as reference dictionary. If the value of the parameter is ref-dict:"__TEMPLATE_SRC_DICTIONARY__" the dictionary of the source pack is used as a reference directory. Else, the value can be set to the name of any existing dictionary. |
ref-dict-migration-set | Values can be:
| Migration set to use for copying forms from the reference dictionary. This parameter must be used only if the reference dictionary (ref-dict) is specified. If reference-dictionary is available, any forms in the reference dictionary that are not included in the new migration pack are copied automatically. Any form that is part of the form exclusion list are excluded from copy. For example, ref-dict-migration-set:"Environment - Flat" |
add-custom-forms | Values can be:
| Option to add custom and non-custom forms to an existing migration pack. For example, add-custom-forms:"CUSTOM_FORMS" add-custom-forms:"NON_CUSTOM_FORMS" add-custom-forms:"CUSTOM,NON_CUSTOM_FORMS" |
custom-form-migration-set | Values can be:
| Migration set used to add custom forms to the existing migration pack. For example, custom-form-migration-set:"Environment - Flat" |
custom-form-names | <form names> | List of custom or non-custom forms to be added to the existing migration pack. You must specify the custom or non-custom forms by using a comma separated list of forms names, or you can specify the form names in a CSV file. If you set the parameter add-custom-forms:"YES", and you do not specify the form names, all forms matching the form type and form which are not present in the migration pack are added to the migration pack. For example, custom-form-names:"form1, form2" OR, if you are using CSV files: custom-form-names:"formnames1.csv, formnames2.csv" |
copy-mapping-data-enrichment-contents | Values can be:
| Option to copy the data enrichment mapping values to the new Migration Pack. |
Example output
For more information on how the command works in the HDM Workbench, see Creating a migration pack for your systems.
VALIDATE-MIGRATION-PACK command
Description
The VALIDATE-MIGRATION-PACK command gives a list of errors for all the unmapped form mappings for a specified migration pack.
Syntax
The syntax for the VALIDATE-MIGRATION-PACK command is as follows:
where <migration-pack-name> is the name of the Migration Pack to be validated.
Example
ADD-EXCLUDED-FORMS command
Description
The ADD-EXCLUDED-FORMS command is used to add the specified forms to the form exclusion list. These forms specified in this command will not be migrated.
Syntax
The syntax for the ADD-EXCLUDED-FORMS command is as follows:
where form1, form2 are the names of the forms to be excluded from the migration.
Example
DELETE-EXCLUDED-FORMS command
Description
The DELETE-EXCLUDED-FORMS command is used to delete the specified forms present in the form exclusion list.
Syntax
The syntax for the DELETE-EXCLUDED-FORMS command is as follows:
Example
PUBLISH-MIGRATION-PACK command
Description
The PUBLISH-MIGRATION-PACK command is used to publish the Migration Pack. This command will set the status of the provided Migration Pack to PUBLISHED.
Syntax
The syntax for the PUBLISH-MIGRATION-PACK command is as follows:
where <pack_name> is the name of the Migration Pack created in the COPY-MIGRATION-PACK command.
Example
Example output
For more information on how the command works in the HDM Workbench, see Creating a migration pack for your systems.
DELETE-MIGRATION-PACK command
Description
The DELETE-MIGRATION-PACK command is used to delete a Migration Pack.
Syntax
The syntax for the DELETE-MIGRATION-PACK command is as follows:
where <migration-pack-name> is the name of the Migration Pack to be deleted.
Example
GET-MIGRATION-PACKS command
Description
The GET-MIGRATION-PACKS command is used to view a Migration Pack.
Syntax
The syntax for the GET-MIGRATION-PACKS command is as follows:
where <migration-pack-name> is the name of the Migration Pack to be viewed.
The migration-pack-name parameter is optional. You can use the following values:
If the value of migration-pack parameter is empty, not specified, or migration-pack:"__ALL__", all the migration packs are printed in the log.
If the value of migration-pack parameter is specified, the specified pack is printed in the log as found or not found.
Example
or
CREATE-MIGRATION-JOB command
Description
The CREATE-MIGRATION-JOB command creates a new migration job to migrate data from the source system to the target system using the Migration Pack, migration set and run time template provided. Optionally, you can specify the number of threads and provide export parameters.
Use one CREATE-MIGRATION-JOB command for each component.
Syntax
The syntax for the CREATE-MIGRATION-JOB command is as follows:
Example
Parameter description
Parameter key | Parameter value | Description |
---|---|---|
job-name | <job_name> | Name for the new migration job. For example, |
source-system | <source_system_name> | Name of the source system used for migration. For example, |
target-system | <target_system_name> | Name of the target system used for migration. For example, |
migration-pack | <migration-pack-name> | Name of the Migration Pack to be used for migration. For example, |
migration-set | <migration-set> | Name of the migration set to be used for migration. For example, |
export-template | <export-template-name> | Name of the export template used for migration. For example, |
source-file-system | <source-file-system-name> | Name of the file system in the source system. For example, |
export-next-id | <value> | Option to export the Next IDs of the forms to be migrated. Values can be:
For example, if you set export-next-id:"None", HDM will not export the Next IDs. |
target-file-system | <target-file-system-name> | Name of the file system in the target system. For example, |
threads | <number_of_threads> | (Optional) Number of threads. For example, threads:5 |
export-parameters | ”param1=value,param2=value” | (Optional) Export parameters for migration. CREATE-MIGRATION-JOB takes date range migration parameters in the export-parameters, in addition to fromTimestamp and toTimestamp. The format for one parameter is [PARAM_NAME]=[FROMTIMESTAMPFORTHISPARAM]:[TOTIMESTAMPFORTHISPARAM]. The timestamp can be in any one of the following formats:
For example, |
enable-delete-tracking | true/false | (Optional) Option to set the Delete Tracking Enabled option. You can use this option for incremental (delta data) migration, if export-template:Incremental. If enable-delete-tracking:"true", BMC Helix Data Manager uses the Delete Tracking Enabled option to manage the deleted records. If enable-delete-tracking:"false", BMC Helix Data Manager uses the Form Deletion Template to manage the deleted records. |
Example output
For more information on how the command works in the HDM Workbench, see Running an export migration job.
CREATE-IMPORT-JOB command
Description
The CREATE-IMPORT-JOB command is used to execute an import job by using the export package, the import template, and the number of threads specified. The export package is created by the job specified by the Migration Job Name.
You can also use some additional parameters by using this command. For more information, see Optional parameters for CREATE-IMPORT-JOB command.
Syntax
The syntax for the CREATE-IMPORT-JOB command is as follows:
Example
Parameter description
Parameter key | Parameter value | Description |
---|---|---|
migration-job-name | <migration_job_name> | Name of the job used for migration. For example, |
import-job-name | <import_job_name> | Name for the new import migration job. For example, |
import-template | <run_time_template_name> | Name of the import template used for migration. For example, |
file-system | <file-system-name> | Name of the file system in the target system. For example, |
import-next-id | <value> | Option to import and update the Next IDs of the forms to be migrated. Values can be:
For example, if you set import-next-id:"None", HDM will not import the Next IDs. |
threads | <number_of_threads> | Number of threads. For example, |
user-cache-action | <value> | Option to import the user cache data from the User form. During export, the user cache is exported from the source system as a form action when processing the User form. user-cache-action allows you to import or ignore the user cache in the import template and import job. Values can be:
The default value for this option is CREATE_AND_MODIFY. |
export-package-folder-name | <folder-name> | Option to select the location of the export package. When running a create import job command, BMC Helix Data Manager checks if an export migration job exists or not. If not, BMC Helix Data Manager creates a new migration pack by using the export package at this location, and then creates an import job. This parameter is mandatory if you are using two BMC Helix Data Manager utilities for migration. If you are using a single BMC Helix Data Manager utility, this parameter is optional for this command. For example, |
migration-set | <migration-set> | Name of the migration set to be used for migration. This parameter is mandatory if you are using two BMC Helix Data Manager utilities for migration. If you are using a single BMC Helix Data Manager utility, this parameter is optional for this command. For example, |
migration pack | <migration-pack-name> | Name of the Migration Pack to be used for migration. This parameter is mandatory if you are using two BMC Helix Data Manager utilities for migration. If you are using a single BMC Helix Data Manager utility, this parameter is optional for this command. For example, |
target-system | <target_system_name> | Name of the target system used for migration. This parameter is mandatory if you are using two BMC Helix Data Manager utilities for migration. If you are using a single BMC Helix Data Manager utility, this parameter is optional for this command. For example, |
Optional parameters for CREATE-IMPORT-JOB command
You can use the following optional parameters when running the CREATE-IMPORT-JOB command:
Parameter | Description |
---|---|
groupid-transform | Apply a prefix transformation using this value. Values are “SIMPLE” or “NONE”. Default value is "NONE”. |
requestid-transform | Apply a prefix transformation using this value. Values are “SIMPLE” or “NONE”. Default value is "NONE”. |
slaid-transform | Apply a prefix transformation using this value. Values are “SIMPLE” or “NONE”. Default value is "NONE”. |
ticketid-transform | Apply a prefix transformation using this value. Values are “SIMPLE” or “NONE”. Default value is "NONE”. |
transform-prefix | The transform prefix to be applied to requestid, slaid and ticketids if the transform option is set to "SIMPLE". |
group-prefix | The transform prefix to be applied to groupid if the transform option is set to "SIMPLE". This must be a positive integer value between 1 and 99. |
deletion-set | Specify the deletion-set to use. This will default to NONE. If you have set the enable-delete-tracking:"true" parameter in the export incremental job, you must set the deletion-set parameter to None. For example, deletion-set:"None" |
incremental | Specify whether incremental import processing is to be used. This should only be used where the export was also an incremental export. |
For more information on how the command works in the HDM Workbench, see Running-an-import-migration-job.
CREATE-DELETION-JOB command
Description
The CREATE-DELETION-JOB command creates a deletion job, executes the export and then executes the deletion if there are no errors in the export.
Syntax
The syntax for the CREATE-DELETION-JOB command is as follows:
Example
Parameter description
Parameter key | Parameter value | Description |
---|---|---|
job-name | <job_name> | Name for the new migration job. For example, |
source-system | <source_system_name> | Name of the source system used for migration. For example, |
target-system | <target_system_name> | Name of the target system used for migration. For example, |
migration-pack | <migration-pack-name> | Name of the Migration Pack to be used for migration. For example, |
migration-set | <migration-set> | Name of the migration set to be used for migration. For example, |
export-template | <export-template-name> | Name of the export template used for migration. For example, |
source-file-system | <source-file-system-name> | Name of the file system in the source system. For example, |
target-file-system | <target-file-system-name> | Name of the file system in the target system. For example, |
threads | <number_of_threads> | (Optional) Number of threads. For example, threads:5 |
export-parameters | ”param1=value,param2=value” | (Optional) Export parameters for migration. CREATE-DELETION-JOB takes date range migration parameters in the export-parameters, in addition to fromTimestamp and toTimestamp. The format for one parameter is [PARAM_NAME]=[FROMTIMESTAMPFORTHISPARAM]:[TOTIMESTAMPFORTHISPARAM]. The timestamp can be in any one of the following formats:
For example, |
For more information on how the command works in the HDM Workbench, see Deleting-data.
CREATE-REIMPORT-JOB command
Description
The CREATE-REIMPORT-JOB command re-imports an import job and executes it.
Syntax
The syntax for the CREATE-REIMPORT-JOB command is as follows:
Example
Parameter description
Parameter key | Parameter value | Description |
---|---|---|
migration-job-name | <job_name> | Name for the new migration job. For example, |
import-job-name | <re_import_job_name> | Name of the import job to be re-imported. For example, |
For more information on how the command works in the HDM Workbench, see Modifying-an-import-job.
CREATE-DATA-UPDATE command
Description
The CREATE-DATA-UPDATE command is used to create a data update job. This command will enable the pre or postmigration scripts to be executed on a particular system.
The data update template must be preloaded into HDM.
Syntax
The syntax for the CREATE-DATA-UPDATE command is as follows:
Example
Parameter desciption
Parameter key | Parameter value | Description |
---|---|---|
data-update-job-name | <update_job_name> | Name for the new data update job. For example, |
data-update-template | <template_name> | Name for the data update template preloaded into the HDM Workbench. For example, |
target-system | <target_system_name> | Name of the target system used for migration. For example, |
Example output
For more information on how the command works in the HDM Workbench, see Completing-postmigration-steps.
RUN-UPDATE-SQL command
Description
The RUN-UPDATE-SQL command executes pre or postmigration SQL scripts that are created in a data update job.
This command is equivalent to the run selected option in the data update page in the HDM Workbench.
Syntax
The syntax for the RUN-UPDATE-SQL command is as follows:
Examples
Parameter description
Parameter key | Parameter value | Description |
---|---|---|
data-update-job-name | <Pre Existing Update Job Name> | Name of the job created by using the data update command. For example, |
target-system | <target-system> | Name for the target system used for migration. For example, |
update-sql-name | <SQL-script> | You can specify the SQL scripts that need to be run. The values can be:
For example, update-sql-name:"__FAILED__ update-sql-name:"Next ID,Update Computed Groups,Incorrect sql" |
Example output
For more information on how the command works in the HDM Workbench, see Completing-postmigration-steps.
FORM-RECON-REPORT command
Description
The FORM-RECON-REPORT command creates the Run Form Count Reconciliation Report from HDM CLI. The report contains the number of records in your source and target system before performing data migration.
You can use the report to reconcile the number of migrated records and validate the migration.
Syntax
The syntax for the FORM-RECON-REPORT command is as follows:
Examples
Parameter description
Parameter key | Parameter value | Description |
---|---|---|
source-system | <source-system-name> | Name of the source system used for migration. For example, |
target-system | <target-system-name> | Name of the target system used for migration. For example, |
report-type | COMPARE | Type of report generated. HDM CLI only supports the COMPARE type of report now. report-type:"COMPARE" |
source-report | <source_form_count_report_name> | Name of the source form count report.
For example, source-report:"FORM-COUNT 24-Feb-2022 22:11:36" |
target-report | <target_form_count_report_name> | Name of the target form count report.
For example, target-report:"FORM-COUNT 24-Feb-2022 23:20:15" |
comparison-report | <comparison_report_name> | Specify the name of the comparison report to be generated. For example, comparison-report:"COMPARE SRC-123 to DST-123" |
download | YES/NO | Option to download the report. Values are YES/NO. If YES, the report is downloaded in the reports sub-folder under the folder where CLI is run. The download location for the reports can be changed in hdm-cli.cfg file. |
For more information on how the command works in the HDM Workbench, see Getting-form-counts.
MAP-SOURCE-LOOKUP-FIELDS command
Description
The MAP-SOURCE-LOOKUP-FIELDS command maps all the unmapped and ignored field mappings from the source lookup form and the target form.
Syntax
The syntax for the MAP-SOURCE-LOOKUP-FIELDS command is as follows:
Example
Parameter description
Parameter key | Parameter value | Description |
---|---|---|
migration-pack | <migration-pack-name> | Name of the migration pack. For example, |
source-form | <source-form-name> | Name of the source form in form mapping. For example, |
target-form | <target-form-name> | Name of the target form in form mapping. For example, |
source-lookup | <data-enrichment-source-lookup-name> | Name of the source data enrichment. For example, |
To add custom forms to the Migration Pack
You can use the following parameters to automatically add custom forms to the Migration Pack:
Parameter | Description |
---|---|
add-custom-forms | Used to automatically add forms identified as ‘Custom’ to the Migration Pack as root nodes. |
custom-form-migration-set | Specify the name of the migration set where you want to add the custom forms. |
You must specify the parameters in the COPY-MIGRATION-PACK command.
For example,