From 8d023d0fe184c524147988cebd4d92c0c5d1d95f Mon Sep 17 00:00:00 2001 From: Erik Westrup Date: Thu, 2 Aug 2018 00:19:36 +0200 Subject: [PATCH] Forget groups hosts together --- usr/local/sbin/restic_backup.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/usr/local/sbin/restic_backup.sh b/usr/local/sbin/restic_backup.sh index d79fe09..1f5aac2 100644 --- a/usr/local/sbin/restic_backup.sh +++ b/usr/local/sbin/restic_backup.sh @@ -63,8 +63,10 @@ wait $! # Dereference old backups. # See restic-forget(1) or http://restic.readthedocs.io/en/latest/060_forget.html +# --group-by only the tag and path, and not by hostname. This is because I create a B2 Bucket per host, and if this hostname accidentially change some time, there would now be multiple backup sets. restic forget \ --tag $BACKUP_TAG \ + --group-by "paths,tags" \ --keep-daily $RETENTION_DAYS \ --keep-weekly $RETENTION_WEEKS \ --keep-monthly $RETENTION_MONTHS \