From 4f9c8e89022e07ffefab559e3ca8d06af557be82 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Mon, 27 Jan 2020 17:51:05 +0100 Subject: backup.sh: Only keep partial backups for 31 days It's difficult enough to recover from full + partial backups, but partial backups are really just a way to quickly save some stuff to the backup repo. They shouldn't be kept for very long. Also the partial- prefix is used by all partial backups, regardless of their actual content. different partial backups could contain different paths so once we start pruning some, we can't really use the others any more. Signed-off-by: Florian Pritz --- backup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backup.sh b/backup.sh index 38e2a89..58518a9 100755 --- a/backup.sh +++ b/backup.sh @@ -142,7 +142,7 @@ backup_borg() { # ensure that we have at least one recent full backup when we purge. if [[ $backup_prefix == 'backup-' ]]; then borg prune --prefix "backup-" --keep-within 7d --keep-daily 7 --keep-weekly 12 --keep-monthly 6 --keep-yearly 0 -v "$dst" - borg prune --prefix "partial-" --keep-within 7d --keep-daily 7 --keep-weekly 12 --keep-monthly 6 --keep-yearly 0 -v "$dst" + borg prune --prefix "partial-" --keep-within 31d -v "$dst" fi } -- cgit v1.2.3-24-g4f1b