summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2020-01-27 17:51:05 +0100
committerFlorian Pritz <bluewind@xinu.at>2020-01-27 17:51:05 +0100
commit4f9c8e89022e07ffefab559e3ca8d06af557be82 (patch)
tree143d67144a1bd4fd2ddbd48fb91333da85a8acef
parentb8c14b1740ac268eb6b4ff56c856ddba1ccfdc2b (diff)
downloadbin-4f9c8e89022e07ffefab559e3ca8d06af557be82.tar.gz
bin-4f9c8e89022e07ffefab559e3ca8d06af557be82.tar.xz
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 <bluewind@xinu.at>
-rwxr-xr-xbackup.sh2
1 files changed, 1 insertions, 1 deletions
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
}