Skip to main content

How can we help you?

Druva Documentation

How to move DB and/or DBLogs for Bynamo Storage on inSync server running on Linux?

OS: Linux
Product edition: inSync On-Premise

 

Overview 

inSync storage comprises of three components:

  • Data 
  • Database (DB)
  • Database logs (DBlogs) 

This article will guide you on how to move the DB and DBlogs to a new location on a Linux system.

Move DB to another location

Before you proceed with the migration, you need to identify the storage for which you need to move the data. Hence, obtain the screen capture of Manage Storage page (click Manage > Storage list) from inSync Management Console and also a screen capture of Summary, Usage Statistics, Performance and Compaction.  

  1. Stop the inSync Services on Linux Server using command:
    /etc/init.d/inSyncMasterAll stop.
  2. Get the new location for database component. Ensure the permissions are configured as (761) with command:
    chmod 761 <path to new folder> 
  3. Change the permission for folder to insyncserver. 
    chown insyncserver:insyncserver <path to new folder>
  4. Run the Catastrophic recovery for storage before moving the DB component. Refer to Linux - Manual Bynamo Storage Recovery for  more information.
  5. Once the Catastrophic recovery completes, add AV exclusions to the target DB location.
  6. Copy the data from source DB location to the target DB location.
    cp –R <path to old db location> <path to new db location> -R = Recursive
  7. Once the DB is copied, verify the folder size along with # of files & file sizes. 
  8. Navigate to location  /opt/Druva/inSyncCloudServer/embeddedDB/bin
  9. Run a following command to start

    /usr/sbin/inSyncConfigDBServer --defaults-file=/opt/Druva/inSyncCloudServer/embeddedDB/inSyncDB.cnf --basedir=/opt/Druva/inSyncCloudServer/embeddedDB

  10. Once the service is up, you can verify the same with command
    ps -ef | grep -i inSync
  11. Run a following command to connect to MySQL: 
    sudo inSyncConfigDBClient -h 127.0.0.1 -P 6075 -u root -pinSyncConfigDB 
  12. Connect to insynconfigdb database and update the storage by running following command.
    Update storage set dbpath=”<New dbpath>” where id=”<StorageID>”;
    For example: if new DB path is /Disk1/Storage1/DruvaDB and Storage ID is 1, then command should be as follows:
    Update storage set dbpath="/Disk1/Storage1/DruvaDB" where id=1; 
  13. Verify the updated storage path by running following command and output should reflect new paths: 
    Select id, name, dbpath, from storage;
  14. Start the services and verify whether if the storage status is healthy. 

Move DB logs to another location

Before you proceed with the migration, you need to identify the storage for which you need to move the data. Hence, obtain the screen capture of Manage Storage page (click Manage > Storage list) from inSync Management Console and also a screen capture of Summary, Usage Statistics, Performance and Compaction.  

  1. Stop the inSync Services on Linux Server.
    etc/init.d/inSyncMasterAll stop
  2. Get the location for new data component. Ensure the permissions are configured as (761).
    chmod 761 <path to new folder> 
  3. Change the permission for folder to insyncserver.  
    chown insyncserver:insyncserver <path to new folder>
  4. Update the location for __bynamolog___ folder in DB_CONFIG file (line with "set_lg_dir <path to __bynamolog___>"). For this, open __bynamodb___ folder, take a backup of the file DB_CONFIG and update the location. For backup:  cp DB_CONFIG DB_CONFIG.bak To update the location, use your favorite text editor on Linux. 
  5. Save the changes in DB_CONFIG file and verify the changes. 
  6. Add AV exclusion to target DBLogs folder.
  7. Copy the DBlogs folder from source to target location. Once the folder is copied, verify the folder and file sizes.
  8. Navigate to /opt/Druva/inSyncCloudServer/embeddedDB/bin location and run the following command. 
    ./inSyncConfigDBServer --defaults-file=/opt/Druva/inSyncCloudServer/embeddedDB/inSyncDB.cnf --basedir=/opt/Druva/inSyncCloudServer/embeddedDB
  9. Once the service is up, you can verify the same with command:
    ps -ef | grep -i inSync.
  10. Run a following command to connect to MySQL: 
    sudo inSyncConfigDBClient -h 127.0.0.1 -P 6075 -u root -pinSyncConfigDB
  11. Connect to insynconfigdb database and update the storage by running following command: 
    Update storage set dblogpath=”<New dblogpath>” where id=”StorageID”; 
    For example: 
    If new dblogpath is /Disk2/Storage1/DBlogs and Storage ID is 1, then command should be as follows: 
    Update storage set dblogpath= "Disk2/Storage1/DBlogs" where id=1;
  12. Verify the updated storage path by running following command and output should reflect new paths: 
    Select id, name, dblogpath, from storage;
  13. Start the service and verify whether if the Storage comes up healthy.

Note: It is recommended to collect server logs and perform a basic health check of the server to ensure there are no pending issues.