Assert the pruning step to ensure 'forgotten' snapshots are removed and don't use disk space.
This commit is contained in:
parent
c23993bdbe
commit
9b9a4afad8
1 changed files with 3 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue