Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/vm.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Hansson <mailto@danielhansson.nu>2022-09-01 22:40:20 +0300
committerGitHub <noreply@github.com>2022-09-01 22:40:20 +0300
commit15d273862c2da40dbfc62563a95b9cf32cd4b08c (patch)
treeaf8430fba3066be09a7ae87113a1bfe00cdf06c7
parent752a15411945202ecdc7dd5ee778bb407d1ca986 (diff)
parent27c1e0e88d625bdaddc66a04ba3a411c852d4815 (diff)
Merge branch 'master' into enh/2356/notify-crontab
-rw-r--r--not-supported/borgbackup.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/not-supported/borgbackup.sh b/not-supported/borgbackup.sh
index 2330a031..5f8804d5 100644
--- a/not-supported/borgbackup.sh
+++ b/not-supported/borgbackup.sh
@@ -541,6 +541,17 @@ Please don't restart or shutdown your server until then!"
fi
done
+ # Run a borg compact which is required with borg 1.2.0 and higher
+ if borg compact -h &>/dev/null
+ then
+ inform_user "$ICyan" "Starting borg compact which will clean up not needed commits and free space..."
+ if ! borg compact "$BACKUP_TARGET_DIRECTORY"
+ then
+ re_rename_snapshot
+ send_error_mail "Some errors were reported during borg compact!"
+ fi
+ fi
+
# Rename the snapshot back to normal
if ! re_rename_snapshot
then