Revert "moved prune to backup"

This reverts commit b1926f1536.
This commit is contained in:
2020-11-25 16:33:45 +01:00
parent 855da9436b
commit 7420af2f1b
6 changed files with 35 additions and 11 deletions

View File

@@ -3,13 +3,6 @@
. $HOME/.bin/restic_common
export RESTIC_PASSWORD="${RESTIC_PASSWORD}"
restic -r $RESTIC_REPOSITORY unlock
info "Starting backup"
restic -r $RESTIC_REPOSITORY unlock
restic --cache-dir $CACHE_DIR -r $RESTIC_REPOSITORY backup $BACKUP_PATHS $BACKUP_EXCLUDES
info "Forgetting snapshots"
restic --cache-dir $CACHE_DIR -r $RESTIC_REPOSITORY forget --keep-hourly $KEEP_HOURS --keep-daily $KEEP_DAYS --keep-weekly $KEEP_WEEKS --keep-monthly $KEEP_WEEKS --keep-yearly $KEEP_YEARS
info "Pruning snapshots"
restic --cache-dir $CACHE_DIR -r $RESTIC_REPOSITORY prune