Configuring custom scripts to run before and after backups

Scripts can run before or after backup operations for further customization.

Configure custom scripts to run before or after a backup. Specify custom scripts in the Pre- and Post-Backup Script fields in the Create Backup dialog.

Custom backup scripts must be located in:
  • Package installs: /usr/share/datastax-agent/bin/backup-scripts
  • Tarball installs: install location/agent/bin/backup-scripts

The backup-scripts directory also contains example scripts. The scripts must be executable, and 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, the script 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 do not have any arguments passed to them.