Running migration script from XMDBTool client
From version 10.2.12, a new run_migration.bat/sh XMDBTool script is introduced to migration scripts, based on demand. This run_migration.bat/sh script can be used from the client side by the support team for migrating tenants to the database. This script is used when the automatic migration script does not run or the migration script is missed on the tenant db because of a manual error.
The XMDBTool batch file starts the migration script on the server but does not wait for the completion. However, the support team can start the migration script and can monitor the completion of the script using the SUMO log tail.
The migration script runs for the transactional, reporting, and the receipts databases. The XMDBTool has the run_migration.bat/sh batch files to start the migration script on the server.
With the 2022.05.00 release, the tenant_restart process will run automatically after the run_migration process is completed.
Arguments:
- mode: FULL or INCREMENTAL. The default value is INCREMENTAL. FULL migration will run all 10.2.x migration scripts where x = 0, 1, 2, … till the latest version.
Example: > run_migration.bat -mode FULL
- targetdb: A comma separated list of target databases. Valid values are:
- OLT – transactional database
- RPT – reporting database
- REC – receipts database
The default values for the targetdb are OLT,RPT,REC.
Note: The central database migration is not supported.
- migrateDbVersions : A comma separated list of versions (for INCREMENTAL mode only).
By default, migrateDbVersions is not active. To activate, add migrationDbVersions.enabled=true to the xmdbtool.properties file.
Note: The latest migration script runs if migrateDbVersions is not activated or not specified in the command line.
Example:
- run_migration.bat - migrateDbVersions 10.2.21, 10.2.22
If migrationDbVersions.enabled is set to true, this command runs the 10.2.20 to 10.2.21 and 10.2.21 to 10.2.22 migration scripts.
- run_migration.bat
This command run only the latest migration script.
Confirmation prompt
Ensure that the values specified are correct before the command proceeds.
For example, if an incorrect parameter name is specified or -dbtarget is used instead of -targetdb (run_migration.bat -migrateDbVersions 10.2.21,10.2.22 -dbtarget RPT), the application displays 'You have selected to run migration scripts [10.2.21, 10.2.22] with parameters: mode=incremental targetdb=[OLT,RPT,REC] Do you wish to continue? (yes/no)' warning message. You can select No and run the command again after correcting the migration script.