Configuring custom scripts to run before and after backups

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.

Was this helpful?

Give Feedback

How can we improve the documentation?

© 2024 DataStax | Privacy policy | Terms of use

Apache, Apache Cassandra, Cassandra, Apache Tomcat, Tomcat, Apache Lucene, Apache Solr, Apache Hadoop, Hadoop, Apache Pulsar, Pulsar, Apache Spark, Spark, Apache TinkerPop, TinkerPop, Apache Kafka and Kafka are either registered trademarks or trademarks of the Apache Software Foundation or its subsidiaries in Canada, the United States and/or other countries. Kubernetes is the registered trademark of the Linux Foundation.

General Inquiries: +1 (650) 389-6000, info@datastax.com