Synchronizing the Master and Slave Repositories - Teradata Data Mover

Teradata Data Mover Installation, Configuration, and Upgrade Guide for Customers

Product
Teradata Data Mover
Release Number
16.10
Published
June 2017
Language
English (United States)
Last Update
2018-03-29
dita:mapPath
wcu1482331938115.ditamap
dita:ditavalPath
4102_ICUCustomer_dm_1610.ditaval
dita:id
B035-4102
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.

When Sync service is enabled, make sure the customer port 25368 is open on the Data Mover TMS.

  1. Check the current configuration settings on the original-master server: /opt/teradata/client/nn.nn/datamover/failover/dmcluster status 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. Shut down the synchronization system on the slave system: /opt/teradata/sync/nn.nn/datamover/dmsync stop Where nn.nn in the path refers to the major and minor version numbers of Data Mover.
  5. Shut down the synchronization system on the master system: /opt/teradata/sync/nn.nn/datamover/dmsync stop Where nn.nn in the path refers to the major and minor version numbers of Data Mover.
  6. Shut down the daemon if it is running on the slave system: /etc/init.d/dmdaemon stop
  7. Start the Data Mover services on the master system and wait two minutes until the services start: /etc/init.d/tdactivemq start /etc/init.d/dmagent start /etc/init.d/dmdaemon start
  8. Backup the master repository: datamove backup_daemon A folder with script files is generated in the /var/opt/teradata/datamover/daemon_backup directory. Once Triggers.sql is generated, check the 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.
  9. Copy the folder from the master to the slave system, as in the following example: scp -r /var/opt/teradata/datamover/daemon_backup/backup_2016-07-05_13.22.41 dm-agent8:/var/opt/teradata/datamover/daemon_backup/
  10. Shut down the daemon service on the master system: /etc/init.d/dmdaemon stop
  11. 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
  12. Change the owner of folders and files that were copied over to dmuser, as in the following example: chown dmuser /var/opt/teradata/daemon_backup chown dmuser /var/opt/teradata/daemon_backup_2016_07-05_13.22.41 chown dmuser /var/opt/teradata/daemon_backup_2016_07-05_13.22.41/*
  13. Change the permissions of the files and folders that were copied over to 755, as shown in the following example: chmod 755 /var/opt/teradata/daemon_backup chmod 755 /var/opt/teradata/daemon_backup_2016_07-05_13.22.41 chmod 755 /var/opt/teradata/daemon_backup_2016_07-05_13.22.41/*
  14. Import the data of the master system repository into the slave system repository by running the restore_daemon command, as shown in the following example: datamove restore_daemon -backup_target_dir /var/opt/teradata/datamover/daemon_backup/backup_2016-07-05_13.22.41 To check if the file sizes within this directory are changing or new files are still be created, use the ls -al command. To check for any errors, use the temp*.out and restore_script.output commands.
  15. 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
  16. Shut down the daemon on the slave system: /etc/init.d/dmdaemon stop