Synchronizing the Master and Slave Repositories - Teradata Data Mover

Teradata Data Mover User Guide

Product
Teradata Data Mover
Release Number
16.00
Published
December 2016
Language
English (United States)
Last Update
2018-03-29
dita:mapPath
rdo1467305237457.ditamap
dita:ditavalPath
ft:empty
dita:id
B035-4101
lifecycle
previous
Product Category
Analytical Ecosystem
Before starting the synchronization service for the first time, the master and slave repositories need to be synchronized. If not synchronized, the slave may not function correctly after it is switched to master mode.
  1. Run /opt/teradata/client/nn.nn/datamover/failover/dmcluster status on the original-master server to check the current configuration settings. If automatic failover is not configured, all components show as STOPPED and on localhost.
  2. Stop the monitoring service on the master and slave monitoring systems if failover was previously configured for the systems:
    /opt/teradata/client/nn.nn/datamover/failover/dmcluster stopmonitor
    Where nn.nn in the path refers to the major and minor version numbers of Data Mover.
  3. Check for any jobs that are running:
    datamove list_jobs -status_mode r
    If any jobs are running, wait for them to complete. You can also stop the running jobs and run cleanup:
    datamove stop -job_name [job-name]
    datamove cleanup -job_name [job-name]
  4. If there are additional connected slaves on the system, and they are in synchronization with the master, wait approximately 30 minutes for the synchronization system to complete its work before shutting down the master synchronization system.
  5. Shut down the synchronization system on the slave system:
    /opt/teradata/sync/nn.nn/dmsync stop
    Where nn.nn in the path refers to the major and minor version numbers of Data Mover.
  6. Shut down the synchronization system on the master system:
    /opt/teradata/sync/nn.nn/dmsync stop
    Where nn.nn in the path refers to the major and minor version numbers of Data Mover.
  7. Shut down the daemon if it is running on the slave system:
    /etc/init.d/dmdaemon stop
  8. Start the Data Mover services on the master system, wait for two minutes until services are started:
    /etc/init.d/tdactivemq start
    /etc/init.d/dmagent start
    /etc/init.d/dmdaemon start
  9. Backup the master repository by running the backup_daemon command:
    datamove backup_daemon
    A folder with script files is generated. Wait until Triggers.sql is generated and check backup_script.output and BackupTriggers.out for any possible errors.
    • To confirm processing is complete, run ls -al commands one after another to see if there are any changes to the file sizes.
    • By default, the folder is generated under the following directory:
    /var/opt/teradata/datamover/daemon_backup
  10. Copy the folder from the master to the slave system. For example:
    scp -r /var/opt/teradata/datamover/daemon_backup/backup_2016-07-05_13.22.41 dm-agent8:/var/opt/teradata/datamover/daemon_backup/
  11. Shut down the daemon service on the master system:
    /etc/init.d/dmdaemon stop
  12. Start the Data Mover services on the slave systems and wait two minutes until the services start:
    /etc/init.d/tdactivemq start
    /etc/init.d/dmagent start
    /etc/init.d/dmdaemon start
  13. Change the owner of folders and files that were copied over to dmuser. For example:
    chwon dmuser /var/opt/teradata/datamover/daemon_backup
    chwon dmuser /var/opt/teradata/datamover/daemon_backup_2016_07-05_13.22.41
    chwon dmuser /var/opt/teradata/datamover/daemon_backup_2016_07-05_13.22.41/*
  14. Change the permissions of the files and folders that were copied over to 755. For example:
    chwon 755 /var/opt/teradata/datamover/daemon_backup
    chwon 755 /var/opt/teradata/datamover/daemon_backup_2016_07-05_13.22.41
    chwon 755 /var/opt/teradata/datamover/daemon_backup_2016_07-05_13.22.41/*
  15. Import the data of the master system repository into the slave system repository by running the restore_daemon command. For example:
    datamove restore_daemon -backup_target_dir /var/opt/teradata/datamover/daemon_backup/backup_2016-07-05_13.22.41
    Use the ls -al command to check if the file sizes within this directory are changing or new files are still being created. Check the temp*.out and restore_script.output files for any errors.
  16. Check for and remove files that might have been generated previously by the synchronization system from both the master and all slave systems. These files are created under the path specified by the sql.log.directory property in the sync.properties file.
    cd /var/opt/teradata/datamover/logs/
    rm dmSyncMaster.json
    rm slave_.*lastread
    rm dmSyncSlave.json
    rm slave_sql.lastExecuted
  17. Shut down the daemon on the slave system:
    /etc/init.d/dmdaemon stop
  18. Start all the Data Mover services on the master system:
    /etc/init.d/tdactivemq start
    /etc/init.d/dmagent start
    /etc/init.d/dmdaemon start
  19. Update the sync.properties file with the appropriate parameters. Start the master synchronization system:
    /opt/teradata/datamover/sync/nn.nn/dmsync start
    Where nn.nn in the path refers to the major and minor version numbers of Data Mover.
  20. Update the sync.properties file with the appropriate parameters. Start the slave synchronization system:
    /opt/teradata/datamover/sync/nn.nn/dmsync start
    Where nn.nn in the path refers to the major and minor version numbers of Data Mover.