Repository tools command to run an online migration
Use the onlineMigrate command to run an online migration on a live server.
Before you begin
Before you start the Change and Configuration Management application upgrade, ensure that the database statistics are up-to-date. Databases generally manage statistics automatically; for example, in a scheduled overnight operation. However, to ensure that the database is fully optimized, you can manually run the statistics as follows:Db2® database:
DB2 REORGCHK UPDATE STATISTICS ON TABLE ALL
Oracle database:
EXEC DBMS_STATS.GATHER_DATABASE_STAT
This step is important for these
reasons: - To ensure that the migration runs as quickly and efficiently as possible
- To minimize online migration time
- To reduce the offline outage time when the repotools -addTables command runs to finalize the database upgrade
Purpose
The onlineMigrate command can reduce server downtime during a migration by running a few of the database migration tasks while the old server remains active.Parameters
Attribute | Description | Required | Default |
---|---|---|---|
numStatesPerRun | The number of item states to process per iteration. Tip: Processing more states in an iteration than the default
value requires more memory.
Tip: To reduce the length
of time that database locks are held, decrease this value.
Important: For the Change and Configuration Management application,
the primary consideration is the average size of the change history
associated with a baseline, which depends on how often a team creates
baselines.
For example, suppose the |
No | 100 |
priority | The priority parameter is used to introduce sleep cycles between transactions in the migration. It represents a percentage of the time online migration is active. You can specify a percentage value between1 and 100 .
The primary consideration is how much load the database can handle
and how responsive the old server is. For example, if the priority value
is Tip: To complete the online migration faster, increase this
value. To improve performance on the server, decrease this value.
Note that complete offline migration is equivalent to running the online migration at priority=100. |
No | 50 |
teamserver.properties | The path to the teamserver.properties file of the server that is
running. This server is the original server database that contains the data to be migrated. Tip: Starting in version 5.0, the
onlineMigrate command is available and
runs from a new installation of each product. You must specify an absolute path to the
teamserver.properties file of the old server. Otherwise, if you keep the path
relative, such as conf\ccm\teamserver.properties , this command points to the
teamserver.properties file in the new server installation instead of the old
server. For an example of an absolute path, see the "Example" section. |
No | conf/ccm/teamserver.properties |
logFile | The path to the log file. | No | repotools-ccm_onlineMigrate.log |
noPrompt | An option that runs the online migration without confirmation from the user. This option is useful for writing automated scripts. |
No | Non applicable |
Examples
Open a command prompt and enter this command:
cd C:\Program Files\IBM\JazzTeamServer\server\ repotools-ccm.bat -onlineMigrate numStatesPerRun=100 priority=50 logFile=repotools_onlineMigrate.log teamserver.properties=C:\Program Files\IBM\OLD_JazzTeamServer\server\conf\ccm\teamserver.properties
Open a command line and enter this command:
cd /opt/IBM/JazzTeamServer/server/ ./repotools-ccm.sh -onlineMigrate numStatesPerRun=100 priority=50 logFile=repotools_onlineMigrate.log teamserver.properties=/opt/IBM/OLD_JazzTeamServer/server/conf/ccm/teamserver.properties
Output
Before the new server is started, while the old server is running, the repotools -onlineMigrate command runs locally from the new server deployment. That command creates tables for new item types in the database and starts iterating through the item states from oldest to newest, creating new items and item states. A daemon process starts and iterates through theITEM_STATES
table.
The process passes item states to the new type handlers. After all
the states are processed, the repository tools command exits.CRJAZ1442I The component model of "com.ibm.team.repository.tests.omtest" was updated from "1" to "2".
The user "ADMIN" has logged in to the database "repositoryDB".
@ID@I Starting online migration for the following models: {"com.ibm.team.repository.tests.omtest":"1"}
@ID@I New type handler "OnlineMigrationSimpleItemHandler" found for item type "SimpleOldType0". Item DB ID = 22.
@ID@I New type handler "OnlineMigrationAuditableItemHandler" found for item type "AuditableOldType0". Item DB ID = 21.
@ID@I Running online migration on 1,703 item states. 400 previously processed. 2 new type handlers.
Type "AuditableLink", 1 of 3 item status previously processed.
Type "AuditableOldType0", 0 of 1,200 item status previously processed.
Type "SimpleOldType0", 399 of 500 item status previously processed.
Status: 500 of 1,703 processed (29% complete). Estimated completion time: 9/23/13 3:00 PM.
Status: 502 of 1,703 processed (29% complete). Estimated completion time: 9/23/13 3:00 PM.
Status: 504 of 1,703 processed (29% complete). Estimated completion time: 9/23/13 3:00 PM.
Status: 507 of 1,703 processed (29% complete). Estimated completion time: 9/23/13 3:00 PM.
Status: 509 of 1,703 processed (29% complete). Estimated completion time: 9/23/13 3:00 PM.
Status: 511 of 1,703 processed (30% complete). Estimated completion time: 9/23/13 3:00 PM.
Status: 513 of 1,703 processed (30% complete). Estimated completion time: 9/23/13 3:00 PM.
Status: 515 of 1,703 processed (30% complete). Estimated completion time: 9/23/13 3:00 PM.
Status: 517 of 1,703 processed (30% complete). Estimated completion time: 9/23/13 3:00 PM.
In addition, you do not need to wait until the online migration process is 100% complete. You can stop the online migration process at any time and continue with offline migration. For details about safely stopping the online migration process, see Repository tools command to stop an online migration.
On a production server, the online migration might never reach 100% completion because the online migration process does not process data that is less than a day old.