Return Standby Server to Standby Mode | High Availability | Teradata Data Mover - Returning the Designated-Standby to Standby Mode - Teradata Data Mover

Teradata® Data Mover User Guide

Product
Teradata Data Mover
Release Number
16.20
Published
November 2021
Language
English (United States)
Last Update
2021-11-04
dita:mapPath
wph1512683331242.ditamap
dita:ditavalPath
4101_UG_dm_1620.ditaval
dita:id
B035-4101
lifecycle
previous
Product Category
Analytical Ecosystem
Once the daemon issues with the failed original-active are resolved, return the designated-standby to its original role as a standby. Because the original-active never connected to the designated-standby as a standby, any updates from the designated-standby while it was in the role of active are not automatically applied to original-active.
Synchronize the repository of the original-active with the repository of the designated-standby prior to returning the designated-standby back to a standby system.
To complete the process of restoring the original-active and returning the designated-standby to its original role as standby, follow the instructions described in the Starting the Synchronization Service section.
  1. Stop monitoring services on all systems (designated-standby, original-active, and standby-only) where nn.nn is the major and minor version numbers of Data Mover:
    /opt/teradata/client/nn.nn/datamover/failover/dmcluster stopmonitor
  2. Check for any jobs running on the designated-standby:
    datamove list_jobs -status_mode r
    If any jobs are running, wait for the jobs to complete or manually stop the jobs and run cleanup:
    datamover stop -job_name [job-name] datamover cleanup -job_name job-name
  3. Shut down the synchronization service on all systems:
    /opt/teradata/datamover/sync/nn.nn/dmsync stop
    Where nn.nn in the path refers to the major and minor version numbers of Data Mover.
  4. Shut down the daemon if it is running on the original-active and standby-only:
    /etc/init.d/dmdaemon stop
  5. If Data Mover services are not running on the designated-standby, turn the services on and wait approximately two minutes until services are started:
    /etc/init.d/tdactivemq start /etc/init.d/dmagent start /etc/init.d/dmdaemon start
  6. Backup the designated-standby 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.outfor any possible errors.
    1. To confirm processing is complete, run ls -al commands one after another to see if there are any changes to the file sizes.
    2. By default, the folder is generated under the directory:
      /var/opt/teradata/datamover/daemon_backup directory
  7. Copy the folder from the designated-standby to the original-active and standby-only, as shown in the following example:
    scp -r /var/opt/teradata/datamover/daemon_backup/dm_myhostname_16.20.23.00_2016-07-05_13.22.41 dm-agent8:/var/opt/teradata/datamover/daemon_backup/
  8. Shut down the daemon service on the designated-standby:
    /etc/init.d/dmdaemon stop
  9. Start the Data Mover services on the original-active and wait two minutes until the services start:
    /etc/init.d/tdactivemq start /etc/init.d/dmagent start /etc/init.d/dmdaemon start
  10. Change the owner of folders and files that were copied over to dmuser, as shown in the following example:
    chown dmuser /var/opt/teradata/datamover/daemon_backup chown dmuser /var/opt/teradata/datamover/daemon_backup_2016_07-05_13.22.41 chown dmuser /var/opt/teradata/datamover/daemon_backup_2016_07-05_13.22.41/*
  11. Change the permissions of the files and folders that were copied over to 755, as shown in the following example:
    chown 755 /var/opt/teradata/datamover/daemon_backup chown 755 /var/opt/teradata/datamover/daemon_backup_2016_07-05_13.22.41 chown 755 /var/opt/teradata/datamover/daemon_backup_2016_07-05_13.22.41/*
  12. Run the restore_daemon command to import the data, as shown in the following example:
    datamove restore_daemon -backup_target_dir /var/opt/teradata/datamover/daemon_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 to check for any errors.
  13. Shutdown the daemon on the original-active:
    /etc/init.d/dmdaemon stop
  14. Start the Data Mover services on the standby-only system:
    /etc/init.d/tdactivemq start /etc/init.d/dmagent start /etc/init.d/dmdaemon start
  15. Change the owner of the folder and files that were copied over to dmuser, as shown in the following example:
    chown dmuser /var/opt/teradata/datamover/daemon_backup chown dmuser /var/opt/teradata/datamover/daemon_backup_2016_07-05_13.22.41 chown dmuser /var/opt/teradata/datamover/daemon_backup_2016_07-05_13.22.41/*
  16. Change the permissions of the files and folder that were copied over to 755, as shown in the following example:
    chown 755 /var/opt/teradata/datamover/daemon_backup chown 755 /var/opt/teradata/datamover/daemon_backup_2016_07-05_13.22.41 chown 755 /var/opt/teradata/datamover/daemon_backup_2016_07-05_13.22.41/*
  17. Import the data, as shown in the following example:
    datamove restore_daemon -backup_target_dir /var/opt/teradata/datamover/daemon_backup_2016-07-05_13.22.41
    Use the ls -al command to check if the files within this directory are changing or new files are still being created. Check the temp*.out and restore_script.output files to check for any errors.
  18. Edit the sync.properties file for the standby-only and have the file point to the original-active.
  19. Shut down the daemon on the standby-only:
    /etc/init.d/dmdaemon stop
  20. Check for and remove the following files from both the active and all standby systems that may have been generated by the synchronization system. These files are created under the path defined by the sql.log.directory property of the sync.properties file.
    cd /var/opt/teradata/datamover/logs/ rm dmSyncMaster.json rm slave_*.lastread rm dmSyncSlave.json rm slave_sql.lastExecuted
    rm metricsCollectorPointer.txt
  21. Edit the auditLogPosition.txt file that is created under the path defined by the sql.log.directory property of the sync.properties file and change all of its content with the WAS_SLAVE string, as shown in the following example:
    echo "WAS_SLAVE"> /var/opt/teradat/datamover/logs/audtLogPosition.txt
    Make sure that there are no spaces or new line characters after string. By making this change, you are commanding the active synchronization system to ignore pre-existing content in the DMAuditLog table.
  22. Start all Data Mover services on the original-active:
    /etc/init.d/tdactivemq start /etc/init.d/dmagent start /etc/init.d/dmdaemon start
  23. Update the sync.properties file with the appropriate parameters, starting with the active synchronization system on the original-active:
    /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.
  24. Update the sync.properties file with the appropriate parameters, starting with the standby synchronization system on the designated-standby and standby-only systems:
    /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.
    Do not delete the files until after you have run the backup_daemon and restore_daemon commands.
    To complete the process of restoring the original-active and returning the designated-standby to its original role as standby, follow the instructions described in Starting the Synchronization Service.
These files are created under the path specified by the sql.log.directory property in the sync.properties file.