You can create a script that automatically copies a backup file to a remote storage location after a QueryGrid Manager backup completes. A post-backup script must meet the following requirements:
- A shell script
- Executable by the tdqgm user
- Able to accept the path of a backup file as a command line argument
- Able to print an appropriate error in standard error and exit format with an exit status of 1
After a post-backup script is set, QueryGrid Manager runs the script automatically each time a periodic backup or the backup.sh command completes.
In cases where QueryGrid Manager observes an error, the daily backup job creates an issue with the MANAGER_BACKUP_FAILED error type and the backup.sh command displays an error message on the console.
- To specify a post-backup script, create a /etc/opt/teradata/tdqgm/backup.properties file and define the post.backup.script property with the path of the script to run.post.backup.script=/mydir/mybackupscript.sh
- [Optional] To test that the post-backup script integration is working, confirm the script ran without error:sh /opt/teradata/tdqgm/bin/backup.sh