Purpose
You can use the backup_daemon command to back up the repository and configuration files of the Data Mover daemon to a directory. You can then restore the backed up files using the restore_daemon command. If running Data Mover version 16.20.25.00 or later, you have the option to restore the backed up files using the restore template script. The Data Mover daemon does not stop when running the backup_daemon command, but the daemon is stopped and restarted when running the restore_daemon command. Results of the Teradata ARC script used to perform the backup are written to a log file backup_script.output in the backup directory.
Starting with Data Mover version 16.20.25.00, three template scripts are generated with the backup_daemon command. Unlike restore_daemon, which requires a daemon in running state to restore a repository, these restore scripts can be used with the restore template script to restore a repository without a daemon running.
- launchScript_restore_template.bat
- arcScript_restore_template.scr
- restore_tempate_readme.txt
Instructions on how to restore a repository are found in the restore_template_readme.txt file.
Syntax
Parameters
See Parameter Order.
- backup_target_dir
- [Optional] The directory where Data Mover writes the backup files. The location you specify can be:
- A path relative to the daemon_backup directory. This is a directory reserved for all backup snapshots.
daemon_backup is a sub-directory of the install location for the Data Mover daemon on your system. By default, the directory is /opt/teradata/datamover/daemon/nn.nn.
- An absolute path. This is any location on the system for which dm_user has write privilege, typically /tmp, /var/opt/teradata/datamover/daemon_backup, and /home. backup_daemon runs under the dm_user account.
- A path relative to the daemon_backup directory. This is a directory reserved for all backup snapshots.
- dm.rest.endpoint
- [Optional] Enter a Data Mover REST server URL to overwrite the default value specified in the commandline.properties file in order to connect to a different REST server (and therefore a different daemon) at runtime.
- security_password
- [Optional] Password for the super user or authorized Viewpoint user.
- security_password_encrypted
- [Optional] Encrypted password for the super user.
- security_username
- [Optional] User ID of the super user or authorized Viewpoint user. The user ID of the super user is dmcl_admin and cannot be changed.
Usage Notes
- If you enter repos_bu001 as the relative path, Data Mover writes the backup files to /var/opt/teradata/datamover/daemon_backup/repos_bu001. Never use an initial slash when specifying a relative path.
- If you enter /home/myhome/repos_bu001 as the absolute path and if dm_user has write privilege for this path, Data Mover writes the backup files to /home/myhome/repos_bu001. Always use an initial slash when specifying an absolute path.
- If you do not specify a directory for the backup, Data Mover creates a directory in the format dm_hostname_nn.nn.nn.nn_YYYY-MM-DD_HH.mm.ss under daemon_backup. This format is composed of dm, followed by the hostname of the repository, the Data Mover version, then the date and timestamp of the backup. For example, a backup that occurs at 2am on hostname myhost and Data Mover version 16.20.23.00 on December 3, 2015 is written to the directory dm_myhost_16.20.23.00_2015-12-03_02.00.00.
- The following scenarios result in an error:
- A job is running when you start the backup_daemon command
- You specify an absolute path, but dm_user does not have write privilege for the path
XML File Examples
For the backup_daemon command, type datamove backup_daemon -f parameters.xml.
In the following example, because parameters.xml does not specify the backup directory, the backup is written to a directory under daemon_backup relative to the install location for the Data Mover daemon on your system. The directory name is based on the timestamp of the backup.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <dmBackupDaemon xmlns="http://schemas.teradata.com/dataMover/v2009" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://schemas.teradata.com/unity/datamover.xsd"> </dmBackupDaemon>If the backup is successful, the name of the directory that was created for the backup is written to standard output.
In the following example, parameters.xml specifies repos_bu_001 as a backup directory under daemon_backup relative to the install location for the Data Mover daemon on your system.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <dmBackupDaemon xmlns="http://schemas.teradata.com/dataMover/v2009" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://schemas.teradata.com/unity/datamover.xsd"> <backup_target_dir>repos_bu_001</backup_target_dir> </dmBackupDaemon>If the backup is successful, the name of the directory repos_bu_001 is written to standard output.