From 9b9a4afad8c4e01559d246f21f9f6aeaf49b5fc9 Mon Sep 17 00:00:00 2001 From: Dave Lane Date: Thu, 25 Aug 2022 22:48:22 +0000 Subject: [PATCH] Assert the pruning step to ensure 'forgotten' snapshots are removed and don't use disk space. --- run-restic.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/run-restic.sh b/run-restic.sh index cbee10a..109908b 100755 --- a/run-restic.sh +++ b/run-restic.sh @@ -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