Skip to main content

 

Druva Documentation

How to move inSyncConfigDB from MySQL to Embedded SQL?

This article applies to:

  • OS: Windows 2008R2, Windows 2012R2
  • Product edition: inSync On-Premises 

Overview

This section describes the procedure to migrate MySQL server to Embedded SQL within inSync. The steps described in this procedure can help customers having inSync database installed on MySQL server to migrate it to embedded SQL.  You need to dump the database from MySQL and load it back to Embedded SQL in Druva.

Move inSyncConfigDB from MySQL to Embedded SQL

  1. Dump the database from MySQL
    1. Open the command prompt as an administrator.
    2. Navigate to C:\Program Files (x86)\MySQL\MySQL Server 5.0\bin
    3. Run the following command.

      C:\Program Files (x86)\MySQL\MySQL Server 5.0\bin >mysql.exe -h localhost -P 3306 -uroot -p 

      CmdPrompt1.png

      To see the databases, you need to connect to MySQL and Druva database individually using the password for MySQL used by the customer.

      CmdPrompt2.png
       
    4. Open another command prompt as an administrator and connect to inSyncConfigDB for Druva.

      C:\Program Files\Druva\inSync Server\embeddedDB\bin> inSyncConfigDBClient.exe -h localhost -P6075 -u root -pinSyncConfigDB

      CmdPrompt3.png


      This connects to MySQL and displays the show databases prompt.
    5. From the task manager, kill the inSyncConfigDBClient.exe. This ends the session for embeddedDB.
    6. Stop and disable the three Druva services.
    7. Run the following command to dump the database from MySQL.

      C:\Program Files (x86)\MySQL\MySQL Server 5.0\bin > mysqldump.exe -h localhost -P 3306 -uroot -p<password for mysql> <databasename> > <Location for .sql file>

      Example:
      C:\Program Files (x86)\MySQL\MySQL Server 5.0\bin > mysqldump.exe -h localhost -P 3306 -uroot -p<password for mysql>  insyncconfigdb > C:\inSyncConfigDB.sql
      Where C:\inSyncConfigDB.sql is the path to inSyncConfigDB.sql located at the root of C:\.
  2. Create inSyncConfigDB database inside Druva's embedded database.
    1. Run the following command to start the inSyncConfigDBServer process.

      inSyncConfigDBServer.exe --defaults-file="c:\Program Files\Druva\inSync Server\embeddedDB\inSyncDB.ini" --basedir="c:\Program Files\Druva\inSync Server\embeddedDB"
    2. Connect to inSyncConfigDBServer.exe using the following command.

      inSyncConfigDBClient -h 127.0.0.1 -P 6075 -uroot -pinSyncConfigDB inSyncConfigDB
    3. Create the inSyncConfigDB using the following command.

      mysql> create database inSyncConfigDB;
      The output appears as below.

      CmdPrompt4.png
  3. Load the same SQL file for which a dump was performed earlier.
    1. Exit the database and run the following command from the command prompt to load the SQL file to inSyncConfigDB.

      C:\Program Files\Druva\inSync Server\embeddedDB\bin> inSyncConfigDBClient.exe -h localhost -P6075 -u root -pinSyncConfigDB insyncconfigdb < C:\inSyncConfigDB.sql

      The output appears as below.

      CmdPrompt5.png
    2. To verify whether the SQL file was imported correctly, connect to inSyncConfigDB and run the following command.

      C:\Progam Files\Druva\inSync Server\embeddedDB\bin>inSyncConfigDBClient.exe -h localhost -P6075 -u root -pinSyncConfigDB

      CmdPrompt6.png

      This displays all the tables from inSyncConfigDB.  The usertable data can be verified using select count (*) from usertable; and select id, name, path, dbpath from storage; commands.

      CmdPrompt7.png
  4. Check the availability of RDS (Relational database service) port 3306 from MySQL
    1. Back up inSyncCloudServer.cfg and mark it as _old.
    2. Navigate to inSyncCloudServer.cfg and update RDS_PORT value to 6075.
    3. Update the RDS_PASSWD value.
      To be able to copy inSyncConfigDB from any instance, such as RDS_PASSWD = 'QlpoOTFBWSZTWW8Oi5QAAAQHgBwACAAJoYAgIAAxANNNBBoGmgrC5OBLl4u5IpwoSDeHRcoA', it must be encrypted.
    4. Save this inSyncCloudServer.cfg and close the file.
    5. Exit all the inSyncConfigDBServer.exe processes and then start the services after changing it to Automatic.