Using custom scripts before and after backups
Scripts can be run before or after backup operations for further customization.
You can configure custom scripts that will run before or after a backup.
Scheduled backups can be configured to run custom scripts before and after the backup is performed. These custom scripts need to be located in /usr/share/datastax-agent/bin/backup-scripts for package installations, or in install location/bin/backup-scripts for tarball installations. This directory also contains example scripts. The scripts need to be executable, and are run as the DataStax agent user (by default the Cassandra user). Any custom scripts should exit with a status of 0 if all operations completed successfully. Otherwise, it should exit with a non-zero status to indicate a failure.
Post-backup scripts are sent a list of files in the backup to stdin
, one file
per line, but will not have any arguments passed to them.