Skip to content
This repository has been archived by the owner. It is now read-only.
Go to file
Cannot retrieve contributors at this time
22 lines (17 sloc) 1.11 KB
# This assumes that start-stop-daemon executes from /sbin/start-stop-daemon
# You may need to use a different tool if start-stop-daemon is not available for your Linux distribution.
# Example crontab entry:
# 0 */2 * * * /path/to/backup/ BUCKET BUCKET_PREFIX REPLICA_ID 720h
# Every two hours, this will backup, delete backups older than 30 days, and garbage collect
RSTRATA_PATH=/path/to/main # TODO: Replace with your path
LOGFILE="rocks-strata.log" # TODO: Replace with your path
source example_aws_credentials # TODO: Replace with your path
# Uses start-stop-daemon because, for a given replica ID, only one write-capable operation should run at once.
/sbin/start-stop-daemon --start --exec $RSTRATA_PATH -- -b=$BUCKET -p=$BUCKET_PREFIX backup -r=$REPLICA_ID >> $LOGFILE 2>&1
/sbin/start-stop-daemon --start --exec $RSTRATA_PATH -- -b=$BUCKET -p=$BUCKET_PREFIX delete -r=$REPLICA_ID -a=$DELETE_OLDER_THAN >> $LOGFILE 2>&1
/sbin/start-stop-daemon --start --exec $RSTRATA_PATH -- -b=$BUCKET -p=$BUCKET_PREFIX gc -r=$REPLICA_ID >> $LOGFILE 2>&1
You can’t perform that action at this time.