Database Migration Tool  

 

Use this tool to migrate data between two databases (Postgres to MSSQL and vice versa) as well as between operating systems (Linux to Windows and vice versa).

You can perform the following data migration with this tool:

 

 

 

Possible Database Migrations


Postgres to MSSQL: Data can be migrated between two databases of the same installation as well as different installations.

MSSQL to Postgres: Data can be migrated between two databases of the same installation as well as different installations.

MSSQL to MSSQL: Data can be migrated between two databases in different servers.

 

 

 

Quick Links

 

Note: Postgres - Postgres > Manual backup can be taken and restored if you need to restore on a different server.

 

Migrating to MSSQL DB:

Follow the steps below if the destination DB is MSSQL/migrating to MSSQL DB

 

Step 1: Stop Application Service:

 

Step 2: Execute Migration Script:


 

Step 3: Provide Destination Database Details:

On providing database details, ensure that the destination database provided is empty for the migration to proceed. If the database does not exist, the database will be created upon saving the details.

 

Step 4: Select Migration Type:

Note: If no type is selected, data migration will be the default.

Step 4.1 Data Migration:

Production or Test Setup Confirmation:

Migration Progress:

Migration Completion:

After the database migration is completed, a popup will confirm the success of the migration.

Post Data-Migration Steps:

 

 

Step 4.2: Server Migration:

Backup Database Files:

The required files will be captured as dbMigrationFileBackup.ezip and placed under <installation-directory>/dbMigrationFileBackup folder.

Production or Test Setup Confirmation:

A popup will appear to confirm whether you want to migrate data to a production or test setup. Click "Yes" for production migration or "No" for a test setup. To cancel migration, select "Cancel."

Migration Progress:

Once the migration type and setup confirmation are chosen, the migration process begins. A progress bar will be displayed.

Migration Completion

  After the server migration is completed, a popup will confirm the success of the migration.
 

 

Note: If migrating to production setup, and fileattachments folder path configured externally in the source installation, then the below popup will be displayed on completion.

 

 

Post Server-Migration Steps:

Password-Protected File Extraction:

The dbMigrationFileBackup.ezip is a password-protected file.

Extracting on Windows

<installation-directory>toolsarchiverwindowsx86-647za.exe x <dbmigrationfilebackup.ezip location> -y -o<installation directory> -p<password>

             Eg: D:DestinationAdventNetMEServiceDesktoolsarchiverwindowsx86-647za.exe x D:migrationfilesdbMigrationFileBackupdbmigrationfilebackup.ezip -y -oD:DestinationAdventNetMEServiceDesk -pSDP1234

Extracting on Linux

<installation-directory>/tools/archiver/linux/x86-64/7zzs x <dbmigrationfilebackup.ezip location> -y -o<installation directory> -p<password>

Eg: /home/user/workspace/builds/AdventNet/ME/ServiceDesk/tools/archiver/linux/x86-64/7zzs x /home/user/migrationFiles/dbMigrationFileBackup.ezip -y -o/home/user/workspace/builds/AdventNet/ME/ServiceDesk/ -pSDP1234

 

 

Migration Failure:

In case of migration failure, a popup will be displayed. Kindly contact support for assistance.

 


 

Migrating to PostgreSQL DB:

If you are migrating to PostgreSQL DB, follow the steps mentioned below:

Step 1: Stop Application Service:

Step 2: Migrating to Bundled PostgresDB

2.1: For same installation

To create the destination Potgres DB,

Note: Avoid using "postgres" as the username, since running the application as a superuser is restricted.


For migration to occur, the destination database should be empty.

Note:For version 14202 and above, copy the reinitialize.bat/sh file from <servicedesk-home>servertools to the bin directory. By executing the reinitialize.bat/sh the data will be deleted. Check if the destination database has been configured by executing changeDBServer.bat/sh before executing the file.

 

Auto-generation of PostgreSQL database password

For users in ServiceDesk Plus build 14610 and above, the default PostgreSQL database password will be auto-generated for sdpadmin.

How to retrieve the password?

The user who installs ServiceDesk Plus can view the auto-generated password by invoking the following script:

While migrating from build 14600 to 14620 or later, the decryptPostgresPassword.bat/.sh file will not be available. Contact support to retrieve the sdpadmin password.

 

 Step 2.1.1: Steps to start the destination Postgres server

 

Step 2.1.2: Execute Migration Script:

Execute the migrateDB.bat/sh script located in {build_dir}/bin.

To provide destination Postgres database details in console mode execute migrateDB.bat/sh --console.

 

Choose option 1 if the destination database server type is PostgreSQL, or option 3 to exit.

 

 

Step 2.1.3: Select Migration Type:

 

Step 2.1.4: Production or Test Setup Confirmation:

A popup will appear, confirming whether you want to migrate data to a production or test setup.

 

Migration Progress:

Once the migration type and setup confirmation are selected, the migration process begins.

               A progress bar will be displayed.

 

 

Migration Completion:

After the database migration is completed, a popup will confirm the success of the migration.

Post-Data-Migration Steps:

pg_ctl.exe stop -D "<installation-directory>ServiceDeskpgsqldata"

 

Step 2.2: In different installation.

Steps to be performed from the destination installation, to create the destination Potgres DB

Note: Avoid using "postgres" as the username, since running the application as a superuser is restricted.

 

For migration to occur, the destination database should be empty.

Note: For version 14202 and above, copy the reinitialize.bat/sh file from <servicedesk-home>servertools to the bin directory.

 

 

Step 2.2.1: Steps to be performed from the source installation

Execute Migration Script:

 

Step 2.2.2: Select Migration Type:

Step 2.2.3: Backup Database Files:

The required files will be captured as dbMigrationFileBackup.ezip and placed under <servicedesk-home>/dbMigrationFileBackup folder.

Step 2.2.4: Production or Test Setup Confirmation:

 

 

Migration Progress:

Once the migration type and setup confirmation are chosen, the migration process begins. A progress bar will be displayed.

 

 

Migration Completion:

After the server migration is completed, a popup will confirm the success of the migration.

If migrating to a production setup, and the fileattachments path is configured externally in the source installation, then the below popup will be displayed on completion.

 

 

Post Server-Migration Steps:

stopDB.bat/sh

Password-Protected File Extraction:

The dbMigrationFileBackup.ezip is a password-protected file.

Extracting in windows

<installation-directory>toolsarchiverwindowsx86-647za.exe x <dbmigrationfilebackup.ezip location> -y - o<installation directory>

Eg: D:DestinationAdventNetMEServiceDesktoolsarchiverwindowsx86-647za.exe x D:migrationfilesdbMigrationFileBackup -y -oD:DestinationAdventNetMEServiceDesk

 

Extracting in Linux

<installation-directory>/tools/archiver/linux/x86-64/7zzs x <dbmigrationfilebackup.ezip location> -y - o<installation directory>

Eg: /home/user/workspace/builds/AdventNet/ME/ServiceDesk/tools/archiver/linux/x86-64/7zzs x /home/user/migrationFiles/dbMigrationFileBackup.ezip -y - o/home/user/workspace/builds/AdventNet/ME/ServiceDesk/

 

The fileattachment foler location path can be modified on the destination installation as below.

The fileattachments folder should be moved from the source server to destination server configured location

 

 


 

Migration to External PostgresDB

Follow the steps below to migrate to External PostgresDB,
 

Step 1: Stop Application Service:

 

Step 2: Database Creation:

Follow the steps 1-6 mentioned in the document here to create a postgres external DB.

 

Note: The external postgres must be started, for migration to proceed.

 

Step 3: Execute Migration Script:

Note: Avoid using "postgres" as the username, since running the application as a superuser is restricted.

 

Step 4: Select Migration Type:

 

 

 

 Step 4.1: Data Migration:

Production or Test Setup Confirmation:

A popup will appear, confirming whether you want to migrate data to a production or test setup.

Migration Progress:

Once the migration type and setup confirmation are selected, the migration process begins. A progress bar will be displayed.

Migration Completion:

After the database migration is completed, a popup will confirm the success of the migration.

 

                                                                           

Post Data-Migration Steps:

 

Server Migration:

Backup Database Files:

The required files will be captured as dbMigrationFileBackup.ezip and placed under <servicedesk-home>/dbMigrationFileBackup folder.

Production or Test Setup Confirmation:

A popup will appear to confirm whether you want to migrate data to a production or test setup.

Migration Progress:

Once the migration type and setup confirmation are chosen, the migration process begins. A progress bar will be displayed.

Migration Completion:

After the database migration is completed, a popup will confirm the success of the migration.

 

If migrating to a production setup, and the fileattachments path is configured externally in the source installation, then the below popup will be displayed on completion.

 

 

 

Post Server-Migration Steps:

Password-Protected File Extraction:

The dbMigrationFileBackup.ezip is a password-protected file.

Extracting in windows

<installation-directory>toolsarchiverwindowsx86-647za.exe x <dbmigrationfilebackup.ezip location> -y -o<installation directory>

Eg: D:DestinationAdventNetMEServiceDesktoolsarchiverwindowsx86-647za.exe x D:migrationfilesdbMigrationFileBackup -y -oD:DestinationAdventNetMEServiceDesk

Extracting in Linux

<installation-directory>/tools/archiver/linux/x86-64/7zzs x <dbmigrationfilebackup.ezip location> -y -o<installation directory>

Eg: /home/user/workspace/builds/AdventNet/ME/ServiceDesk/tools/archiver/linux/x86-64/7zzs x /home/user/migrationFiles/dbMigrationFileBackup.ezip -y -o/home/user/workspace/builds/AdventNet/ME/ServiceDesk/

 

Migration Failure:

In case of migration failure, a popup will display. Contact support for assistance.

 

Ensure to follow these steps carefully for a successful migration to the PostgresSQL database.