From 2d6daa50f5d64a304770eaf2debcc269ae3de57b Mon Sep 17 00:00:00 2001 From: "Christian P. MOMON" Date: Wed, 8 Feb 2023 13:08:40 +0100 Subject: [PATCH] Plan borg: improved script. --- Plan Borg/bin/doprunes | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Plan Borg/bin/doprunes b/Plan Borg/bin/doprunes index b335e80..4c278f7 100755 --- a/Plan Borg/bin/doprunes +++ b/Plan Borg/bin/doprunes @@ -6,7 +6,14 @@ echo "========================================================================== START_TIME=$(date +"%s") START_SIZE=$(du -s /var/backups/borg/ | awk '{ print $1 }') -borgmatic prune --stats --files --verbosity 1 +#borgmatic prune --stats --files --verbosity 1 + +# Only last borgmatic version has the compact command. +cd /var/backups/borg/ +for REPO in $( ls -d *.repo ); do + echo "Compact $REPO" + borg compact "$REPO" +done echo "=====" DURATION=$(($(date +"%s")-$START_TIME))