Repository tools command to revert an online migration

Use the onlineMigrateRevert command to revert database changes that occurred during an online migration.

Important: IBM® Engineering Workflow Management is the only IBM Engineering Lifecycle Management application that supports online migration.

Purpose

The onlineMigrateRevert command removes partially migrated data from the database so that you can restart an online migration from the beginning. However, this command does not fully restore the database to its original condition. Instead, it clears new pending states that were added to the ITEM_STATES, ITEM_CURRENTS, and ITEM_TYPES tables and clears the online migration rows from the JAZZ.PROPERTIES table.

Parameters

Attribute Description Required Default
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 that is going to be migrated.
Tip: Starting in version 5.0, the onlineMigrateRevert 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_onlineMigrateRevert.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

Example

For Windows
operating system Open a command prompt and enter this command:

cd C:\Program Files\IBM\JazzTeamServer\server\
repotools-ccm.bat -onlineMigrateRevert logFile=repo tools-ccm_onlineMigrateRevert.log teamserver.properties=C:\Program Files\IBM\OLD_JazzTeamServer\server\conf\ccm\teamserver.properties

For Unix
operating systems Open a command line and enter this command:

cd /opt/IBM/JazzTeamServer/server/
./repotools-ccm.sh -onlineMigrateRevert logFile=repo tools-ccm_onlineMigrateRevert.log teamserver.properties=/opt/IBM/OLD_JazzTeamServer/server/conf/ccm/teamserver.properties

Output

This example shows the output of the repotools -onlineMigrateRevert command:
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".
CRJAZ9999I Starting online migration reversal.
Status: 102 of 102 processed (100% complete).
CRJAZ9999I Cleaned table ITEM_STATES in 399ms.
Status: 101 of 101 processed (100% complete).
CRJAZ9999I Cleaned table ITEM_CURRENTS in 148ms.
Status: 101 of 101 processed (100% complete).
CRJAZ9999I Cleaned table ITEM_TYPES in 171ms.
CRJAZ9999I Cleaning table JAZZ.PROPERTIES.
CRJAZ9999I Cleaned table JAZZ.PROPERTIES in 35ms.
CRJAZ9999I online migration reversal finished.
CRJAZ9999I To finish reverting online migration, you must manually delete all rows from the following tables in the database: 
MY_MODEL.MY_AUDITABLE_NEW_TYPE, MY_MODEL.MY_SIMPLE_NEW_TYPE, MY_MODEL.MY_EXTRACTED_CONTENT.
Remember: You must run the SQL DELETE command on any new tables that are created by online migration process to clear their contents. Otherwise, when the -onlineMigrate command runs again, the command fails because duplicate primary key exceptions occur when the command tries to reinsert new rows into those tables.
Do not drop those tables from the schema. Otherwise, when the -onlineMigrate or -addTables command runs again, the command fails because duplicate primary key exceptions occur against the JAZZ.TABLE_MAP table. For a list of tables to clear by using an SQL DELETE command, see the output for the repotools -onlineMigrateRevert command. For example, the output in the previous example suggests manually deleting all of the rows from these tables:
  • MY_MODEL.MY_AUDITABLE_NEW_TYPE
  • MY_MODEL.MY_SIMPLE_NEW_TYPE
  • MY_MODEL.MY_EXTRACTED_CONTENT
Important: For Rational Team Concert 5.0.0 and later, after running the revert command, you must manually delete all rows from the following tables:
  • SCM.HISTORY_GRAPH_NODE
  • SCM.HISTORIC_ENTRY
  • SCM.HGN_MIGRATION
  • SCM.MIGRATION_DEFERRED