Assert the pruning step to ensure 'forgotten' snapshots are removed and don't use disk space.

This commit is contained in:
Dave Lane 2022-08-25 22:48:22 +00:00
parent c23993bdbe
commit 9b9a4afad8

View file

@ -52,12 +52,15 @@ fi
ARGS="-r $DST --password-file $PW backup --tag $TAG --exclude-file=/restic.excludes --files-from /restic.files"
# clean up old snapshots
CLEAN="-r $DST --password-file $PW forget --prune --tag $TAG --keep-daily 4 --keep-weekly 3 --keep-monthly 6 --keep-yearly 3"
# prune 'forgotten' snapshots
PRUNE="-r $DST --password-file $PW prune
# create a snapshot
log "running snapshot"
$NICE $CMD $ARGS >> $LOG
# remove old snapshots
log "running cleanup"
$NICE $CMD $CLEAN >> $LOG
$NICE $CMD $PRUNE >> $LOG
# leave extra spaces
log "done"
space