added --prune flag to 'forget' command to get it to remove old backups to clear disk space

This commit is contained in:
Dave Lane 2021-05-04 04:05:50 +00:00
parent 628ab78f2a
commit 6662783dc7

View file

@ -51,7 +51,7 @@ fi
# run the snapshot
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 --tag $TAG --keep-daily 7 --keep-weekly 5 --keep-monthly 12 --keep-yearly 7"
CLEAN="-r $DST --password-file $PW forget --prune --tag $TAG --keep-daily 7 --keep-weekly 5 --keep-monthly 12 --keep-yearly 7"
# create a snapshot
log "running snapshot"
$NICE $CMD $ARGS >> $LOG