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.
- 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.
-
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. -
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]
- 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.
-
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. -
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. -
Shut down the daemon if it is running on the slave system:
/etc/init.d/dmdaemon stop
-
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
-
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
-
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/
-
Shut down the daemon service on the master system:
/etc/init.d/dmdaemon stop
-
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
-
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/*
-
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/*
-
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. -
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
-
Shut down the daemon on the slave system:
/etc/init.d/dmdaemon stop
-
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
-
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. -
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.