From d70f450e2d19569c721a15f9e32559a1478c18a6 Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Tue, 7 Sep 2021 22:04:23 +0100 Subject: [PATCH] Change forget resolution to 30d Restic is really annoying with its retention arguments, not really allowing what I want, so this is the easiest way to get decent retention. --- ansible/roles/restic/files/backrest.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ansible/roles/restic/files/backrest.sh b/ansible/roles/restic/files/backrest.sh index a762863..3ddc555 100644 --- a/ansible/roles/restic/files/backrest.sh +++ b/ansible/roles/restic/files/backrest.sh @@ -10,7 +10,7 @@ export RESTIC_REPOSITORY="b2:{{ restic_b2_bucket }}" export RESTIC_LOG_DIR="$HOME/log" export RESTIC_LOG_FILE="$RESTIC_LOG_DIR/$1-$(date -Iseconds).log" -export FORGET_OPTIONS="--keep-daily 7 --keep-weekly 2" +export FORGET_OPTIONS="--keep-daily 30" mkdir -p "$RESTIC_LOG_DIR" @@ -42,7 +42,7 @@ cron_forget() { # Forget legacy snapshots forget() { set -x - restic forget --keep-daily 7 --keep-weekly 2 $@ + restic forget $FORGET_OPTIONS $@ } # Prune orphaned files