Transferring data between environments
Scenario for using the BMC Digital Workplace Data Transfer tool
Allen, an administrator at Calbro Services, is working on deploying BMC Digital Workplace in his organization. In a preproduction environment, he has configured the BMC Digital Workplace application according to the organization's needs. The validation testing is successful and a Go-Live is approved. Allen now wants to configure MyIT in the production environment exactly like the preproduction environment. Instead of manually configuring BMC Digital Workplace in the production environment or manually copying all data between environments, Allen chooses to use the BMC Digital Workplace Data Transfer tool to perform the task. By using the tool, Allen is able to seamlessly transfer all data to the production environment.
The following video (4:25 min) shows the process of exporting and importing data from aBMC Digital Workplace source tenant to a target tenant.
Before you begin
- Ensure that you have permissions to access the databases on the source and target MyIT environments.
- Locate the BMC Digital Workplace Data Transfer tool scripts in the MyIT_Home\SmartIT_MyIT\data-transfer\scripts directory, where MyIT_Home is the BMC Digital Workplace installation directory. The default BMC Digital Workplace installation location is as follows:
- (Windows) C:\Program Files\BMC Software\Smart_IT_MyIT\
- (Linux) /opt/bmc/Smart_IT_MyIT/
- If you are running the data transfer from a computer other than the MyIT host computer, copy the entire contents of the \data-transfer directory to your local computer.
- Ensure that the Social and MyITTomcat services are not being used during the data transfer.
- Ensure that users do not create new data in the source database when data export is in progress. Otherwise, the newly created data might not be included in the data export.
To transfer data between environments
The following graphic shows the sequential steps in the data transfer process. Click each link to go to the specific section.
For information about issues you might have during data transfer, and the corrective actions, see Troubleshooting-data-transfer-issues.
Step 1: Export data from the source tenant database
- In the \scripts directory, locate the the set_env.bat or set_env.sh scripts.
Using a text editor such as Notepad, edit the set_env.bat or set_env.sh script and enter the values for the different variables.
The set_env.bat or set_env.sh scripts include a brief description of each variable.
- Save and close the set_env.bat or set_env.sh script.
Edit the \SmartIT_MyIT\data-transfer\connection\db_type.connection.properties file and specify required database information of the source database.
- Save and close the db_type.connection.properties file.
From the CLI console, navigate to the \scripts directory and run the appropriate command:
- To export all data, run the data_dump.sh or data_dump.bat script.
- To export only selected data, as specified in the export_type variable in the set_env.bat or set_env.sh script, run the run_export.bat or run_export.sh script.
Depending on the file name you set in the output_file_path variable, an output file, file_name.zip file is created. The tool uses this file for importing the data in the target database.
Step 2: Import the data to the target tenant database
- In the \scripts directory, locate the the set_env.bat or set_env.sh script.
Using a text editor such as Notepad, edit the set_env.bat or set_env.sh script and enter the values for the different variables.
- Save and close the set_env.bat or set_env.sh script.
Edit the \connection\db_type.connection.properties file and specify the required database information of the target database.
- Save and close the db_type.connection.properties file.
- From the CLI console, navigate to the \scripts directory and run the run_import.bat or run_import.sh command.
The tool transfers the data to the target database.
Step 3: Verify the data transfer
- Run SQL queries to verify that the data in the migrated tables in the source and target databases match.
- Login to the BMC Digital Workplace application on both source and target servers and verify that all required data is available in the UI.
List of tables associated with export_type values
The export_type variable in the set_env.bat or set_env.sh script contains a comma-separated list of values that define which database tables you transfer between the source and target databases. You can specify the value of this variable and then use the run_export.bat or run_export.sh script to transfer selected data between the source and target databases. The following table lists the valid values for the export_type variable and the database tables that correspond to each value: