Move old DGE to a new physical DGE

QUESTION

How to migrate a DGE to a new machine (real or virtual)?

RESOLUTION

Note: These instructions are for migrating a Traverse DGE (upstream) to a new server of the same OS (e.g. Linux to Linux or Windows to Windows). Any references to TRAVERSE_HOME should be replaced with the actual Traverse installation directory (e.g. "C:\Program Files (x86)\Traverse" or /usr/local/traverse)

  1. Install the identical Traverse revision on the (new) destination server, as the original server
  2. Stop Traverse software components on the destination server
  3. Take the most recent database backup on the source DGE, review this KB: Make a current Traverse database backup
  4. Stop Traverse software on the (original) source server
  5. Copy the 'TRAVERSE_HOME\etc\licenseKey.xml' from the source to the same destination on the new server.
  6. Apply any customization from 'TRAVERSE_HOME\etc\emerald.xml' and 'TRAVERSE_HOME\etc\dge.xml' (namely the unique dge name) on the source to the same file on the destination server. One way to achieve this is to compare the two files to highlight the differences (e.g. 'diff' or 'compare' commands)
  7. In the rare case that changes have been made to any device signatures in 'etc\typedef', copy the customized device signatures from the source server to overwrite the copies in the destination server.  Altering files in this folder is not recommended as the folder is overwritten during upgrades.
  8. Restore the MySQL databases:
    1. Windows
    2. Linux

Restoring DGE / MySQL Database:

Windows

Copy the following files and folders from source to the destination:

  1. TRAVERSE_HOME\database\mysql\aggregateddatadb\
  2. TRAVERSE_HOME\database\mysql\processdb\
  3. TRAVERSE_HOME\apps\silk\data\
  4. TRAVERSE_HOME\plugin\
cd TRAVERSE_HOME

net start nvdgedb

apps\
mysql\bin\mysql --defaults-file=etc\mysql.conf --execute="SHOW TABLES" --database="aggregateddatadb" > tables.txt 

for /F "skip=1" %G IN (tables.txt) DO @apps\mysql\bin\mysql --defaults-file=
etc\mysql.conf --execute="REPAIR TABLE %G USE_FRM" aggregateddatadb >> logs\database_restore.log 

apps\
mysql\bin\mysql --defaults-file=etc\mysql.conf --execute="SHOW TABLES" --database="processdb" > tables.txt 

for /F "skip=1" %G IN (tables.txt) DO @apps\mysql\bin\mysql --defaults-file=etc\mysql.conf --execute="REPAIR TABLE %G USE_FRM" processdb >> logs\database_restore.log

Linux

To restore the DGE database from a snapshot created by db_backup.sh, you must restore the.MYD and .FRM files from the snapshot archive in TRAVERSE_HOME/database/backup, and then rebuild the database indexes with the following steps: 

  1. Shut down all components. 
  2. At a command prompt, execute the following commands: 
    cd TRAVERSE_HOME 

    etc/traverse.init stop 

    mv database/mysql/aggregateddatadb database/mysql/aggregateddatadb.OLD 

    gunzip -c database/backup/backup-mm-dd-yy,hh-mm.tar.gz | tar xvf - database/mysql/backup_dge 

    etc/dgedb.init start restore 

    apps/mysql/bin/mysql --defaults-file=etc/mysql.conf --skip-column-names -u root --password= --batch -e 'show tables;' backup_dge > /tmp/names.txt 

    apps/mysql/bin/mysql --defaults-file=etc/mysql.conf -u root --password= --execute "CREATE DATABASE aggregateddatadb;" 

    for i in `cat /tmp/names.txt`; do apps/mysql/bin/mysql --defaults-file=etc/mysql.conf -u root --password= --execute "RESTORE TABLE $i FROM 'TRAVERSE_HOME/database/mysql/backup_dge'" aggregateddatadb; done 

    etc/dgedb.init stop 

    rm -rf database/mysql/backup_dge 

    etc/traverse.init start 
  3. On the source server:
    cd /tmp/  

    tar zxvf TRAVERSE_HOME/database/backup/backup-mm-dd-yy,hh-mm.tar.gz database/backup/backup_dge  

    tar zxvf TRAVERSE_HOME/database/backup/backup-mm-dd-yy,hh-mm.tar.gz database/backup/backup_apm 
    1. Copy the following files and folders from source to the destination:

      SOURCE (old DGE): /tmp/database/backup/backup_dge 
      DESTINATION (new DGE): TRAVERSE_HOME/database/mysql/backup_dge 

      SOURCE (old DGE): /tmp/database/backup/backup_apm 
      DESTINATION (new DGE): TRAVERSE_HOME/database/mysql/backup_apm/ 

    2. Copy the following files and folders from source to the destination: 

      TRAVERSE_HOME
      \apps\silk\data\ 
      TRAVERSE_HOME\plugin\ 
  4. On the destination server: 
    cd TRAVERSE_HOME 
     
    etc/dgedb.init start restore 

    apps/mysql/bin/mysql --defaults-file=etc/mysql.conf --skip-column-names -u root --password= -e 'show tables;' --database=backup_dge > /tmp/tables.txt 

    apps/mysql/bin/mysql --defaults-file=etc/mysql.conf -u root --password= < database/schema/mysql/dropDGEdb.sql 

    apps/mysql/bin/mysql --defaults-file=etc/mysql.conf -u root --password= < database/schema/mysql/createDGEdb.sql 

    apps/mysql/bin/mysql --defaults-file=etc/mysql.conf -u root --password= < database/schema/mysql/createDGEdbUsers.sql 

    for i in `cat /tmp/tables.txt`; do apps/mysql/bin/mysql --defaults-file=etc/mysql.conf -u root --password= --execute "RESTORE TABLE $i FROM 'TRAVERSE_HOME/database/mysql/backup_dge'" aggregateddatadb; done 

    apps/mysql/bin/mysql --defaults-file=etc/mysql.conf -u root --password= < database/schema/mysql/createDGEdbProcs.sql 

    apps/mysql/bin/mysql --defaults-file=etc/mysql.conf --skip-column-names -u root --password= -e 'show tables;' --database=backup_apm > /tmp/tables.txt 

    apps/mysql/bin/mysql --defaults-file=etc/mysql.conf -u root --password= < database/schema/mysql/dropAPMdb.sql 

    apps/mysql/bin/mysql --defaults-file=etc/mysql.conf -u root --password= < database/schema/mysql/createAPMdb.sql 

    apps/mysql/bin/mysql --defaults-file=etc/mysql.conf -u root --password= < database/schema/mysql/createAPMdbUsers.sql 

    for i in `cat /tmp/tables.txt`; do apps/mysql/bin/mysql --defaults-file=etc/mysql.conf -u root --password= --execute "RESTORE TABLE $i FROM 'TRAVERSE_HOME/database/mysql/backup_apm'" processdb; done 

    apps/mysql/bin/mysql --defaults-file=etc/mysql.conf -u root --password= < database/schema/mysql/createAPMdbProcs.sql 
  5. Depending on the destination OS, please follow these steps:
    1. Linux
      cd TRAVERSE_HOME 
      etc/dgedb.init stop 
      utils/db_optimize.pl -r
    2. Windows
      cd TRAVERSE_HOME 
      net stop nvdgedb 
      utils\db_optimize.pl -r
  6. Start the Traverse components on the (new) destination server 
  7. Linux 
    You may now delete the database/mysql/backup_dge and database/mysql/backup_apm directories after verifying test history within the Traverse UI 
     

 

APPLIES TO 

All versions of Traverse, though 'processdb' may not exist in early versions

 

Have more questions?

Contact us

Was this article helpful?
0 out of 0 found this helpful

Provide feedback for the Documentation team!

Browse this section