reintroduce separate pruning

This commit is contained in:
2020-11-25 17:04:52 +01:00
parent 7420af2f1b
commit b037da1b1c
6 changed files with 13 additions and 15 deletions

View File

@@ -6,3 +6,6 @@ export RESTIC_PASSWORD="${RESTIC_PASSWORD}"
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

View File

@@ -40,7 +40,7 @@ ping -c 3 192.168.178.100 &> /dev/null
if [[ $? > 0 ]]; then
ping -c 3 1.1.1.1 &> /dev/null
ping -c 3 10.0.1.3 &> /dev/null
if [[ $? > 0 ]]; then
info "Not connected."
@@ -51,4 +51,4 @@ fi
BACKUP_SERVER="192.168.178.100"
echo "Done"
read_config
read_config

View File

@@ -2,10 +2,5 @@
source $HOME/.bin/restic_common
info "Forgetting snapshots"
restic -r $RESTIC_REPOSITORY unlock
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 -r $RESTIC_REPOSITORY unlock
restic --cache-dir $CACHE_DIR -r $RESTIC_REPOSITORY prune
restic --cache-dir $CACHE_DIR -r $RESTIC_REPOSITORY prune