Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

WARNING: This utility is still in beta. Please inform us before using this utility. 

...

  1. Download the migration utility(migrateutil-1.0.0-RC-05.jarzip) and store it on the JIRA+RMsis server. (Please send a mail to support@optimizory.com to get the link to download the utility)

    • Image RemovedImage Added 

    • Here, migrateutil-1.0.0-RC-05.jarzip is stored in the "/Users/pritam/path/to/migrationUtility" directory.

  2. Extract the contents of the tar zip file. 

    • Image RemovedImage Added 

    • A directory with name "migrateutil-1.0.0-RC-05" will be created.

  3. Switch to the directory migrateutil-1.0.0-RC-0405 and create a directory with name "backup" where the contents of the existing database will be dumped.

    • Image RemovedImage Added 
    • Here, a directory named "backup" is created which will be used later to store the database backup.
  4. Create a copy of the file migrateutil-1.0.0-RC-05/conf/jdbc.properties.template and save it with the name "jdbc.properties" and then open it in the text editor. The contents of the file is displayed in the image attached below:
    • Image RemovedImage Added
  5. The newly created file will be used by the utility to access the RMsis database. You will have to update the database connection details in the file. The following properties needs to be uncommented and updated:
    1. jdbc.driver: Uncomment this field and leave Leave it's value to default (as already present in the jdbc.properties file). This field is used to identify the jdbc driver used to connect to RMsis database.
    2. jdbc.url : Uncomment this field and update Update the IP address and port number of the database server if required. 
    3. db.typeName : Uncomment this field and leave Leave it's value to default. This field is used to identify the type (H2/MySQL/PostgreSQL/Oracle/SQL Server) of database in use type of database to be used with RMsis. MySQL is being used here.
    4. db.schemaName :  Uncomment this field and replace Replace rmsisDatabaseName with the name of the database being used for RMsis.
    5. jdbc.username: Uncomment this field and and replace Replace it with the username used to connect to RMsis database server.
    6. jdbc.password: Uncomment this field and replace Replace it with the password used to connect to RMsis database server.
      Note: To uncomment a field, remove the "#" symbol at the beginning of the field name. 
    • For example, if  you are using a MySQL database with RMsis having name "rmsisDb". The content of the updated file will look like the image mentioned below:
      Image Removed
      Image Added
  6. Copy the files projectDetails.properties and usersMap.properties created using migration-validator.jar into migrateutil-1.0.0-RC-05/conf directory.

  7. Execute the migration utility using the following command to dump the database content: 

    • -b switch is used to specify the location of the directory where the backup will be stored, here it is the location of the "backup" directory created in step 3.

    • -v switch is used to specify the version of RMsis presently in use. Here, it is v1.8.9.1-r318. Format used: v<RMsisVersionNumber>-r<RMsisBuildNumber>

    • -j switch is used to specify the location of the jdbc.properties file created and updated in step 4 & 5.

    • -p switch is used to specify the project whose data is to be dumped. PKEY is the project key of the project. Here, it is FIR.
    • dump is the name of the command which directs migration utility to create the backup of RMsis database

      Code Block
      titleCommand to create the backup using migration utility
       ./bin/migrateutil -b /path/to/migrationUtility/backupDirectory/ -v v1.8.9.81-r301r318 -j /path/to/migrationUtility/conf/jdbc.properties dump -p PKEY
       
      Example: 
      ./bin/migrateutil -b /Users/pritam/path/to/migrationUtility/migrateutil-1.0.0-RC-04/backup/ -v v1.8.9.1-r318 -j /Users/pritam/path/to/migrationUtility/migrateutil-1.0.0-RC-05/conf/jdbc.properties dump -p DEMO
      Image Removed
       FIR
       
      ./bin/migrateutil -b ./backup/ -v v1.8.9.1-r318 -j ./conf/jdbc.properties dump -p FIR
    • Image Added

  8. Upon successful execution, the database content will be dumped in the directory specified to create the backup using the -b switch. Here, a directory named "301318-1.8.9.81-20172018-05-1311"  is created inside the "/Users/pritam/path/to/migrationUtility/migrateutil-1.0.0-RC-05/backup/" directory.

    • Image Added

  9. Copy the backup folder the migrateutil-1.0.0-RC-05 directory on the destination server. The contents of this conf and backup folder will be used to restore the RMsis data on destination database.

Steps to restore the backup to target database:

  1. Same as step 1 of "Steps to create the dump of existing database"
  2. Same as step 2 of "Steps to create the dump of existing database"
  3. Same as step 3 of "Steps to create the dump of existing database"
  4. Same as step 4 of "Steps to create the dump of existing database"
  5. Same as step 5 of Restore the JIRA project data and run migration-validator.jar to validate if pre-requisites for data restoration is met or not. Make necessary changes if required.
  6. Copy the entire  migrateutil-1.0.0-RC-05 directory along-with its content onto the destination server. 
  7. Update the database connection details as per the target RMsis database in the conf/jdbc.properties file as per the steps mentioned in step 5 of "Steps to create the dump of existing database"Alternatively, if the destination database is on the same machine/network. Skip steps 1-4 and Switch to step 5.
    • For example, if  the target database is a PostgreSQL MySQL database having name "rmsisRestoredDb". The content of the updated file will look like the image mentioned below:
    • Image Removed
    • If the destination database is on the same machine/network, skip this step as the data is already available.
      • Image Removed
    Copy the contents of the backup folder created after executing the dump command onto the destination server. 
      • Image Added
  8. Execute the migration utility using the following command to restore the backup in target RMsis database content
    • -b switch is used to specify the location of the directory where the backup of previous data is stored, here it is the location of the "backup" directory created in step 3 and backup data was copied in step 6.

    • -v switch is used to specify the version of RMsis presently in use. Here, it is v1.8.8-r301. Format used: v<RMsisVersionNumber>-r<RMsisBuildNumber>

    • -j  switch is used to specify the location of the updated jdbc.properties file created and updated in step 4 & 5which contains the details of target RMsis database.

    • restore is the name of the command which directs migration utility to restore the backup of old RMsis database into destination database.

    • -x switch is used to specify that RMsis database already exists. This will restore the additional data related to single project being restoredonly.
    • Code Block
      titleCommand to restore the backup using migration utility
      ./bin/migrateutil -b /path/to/migrationUtility/backupDirectory/ -v v1.8.9.1-r318 -j /path/to/migrationUtility/conf/jdbc.properties restore -x
       
      Example: 
      ./bin/migrateutil -b /Users/pritam/path/to/migrationUtility/migrateutil-1.0.0-RC-0405/backup/ -v v1.8.9.1-r318 -j /Users/pritam/path/to/migrationUtility/migrateutil-1.0.0-RC-05/conf/jdbc.properties restore -x
       
      ./bin/migrateutil -b ./backup/ -v v1.8.9.1-r318 -j ./conf/jdbc.properties restore -x
      Image Removed
  9. Upon successful execution, the database content will be restored to the destination database.

...