From 22afeafecab0b061b549320f994e38fc9e4c9e56 Mon Sep 17 00:00:00 2001 From: xengineering Date: Thu, 20 Jul 2023 21:43:36 +0200 Subject: Remove `borg compact` from default backup script This is a quite long running operation. It might be better to do this in the night on a server which stores the backup repo and not let the client PCs do the job on every backup. --- backup.sh | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'backup.sh') diff --git a/backup.sh b/backup.sh index 6666527..eef5cc3 100755 --- a/backup.sh +++ b/backup.sh @@ -17,7 +17,7 @@ ADMIN='admin@example.org' REPO='/srv/borg' MARIADB_BACKUP_DIR='/var/local/mariadb_export' -# create full backup for mariadb to ensure consistent state +# create full backup for mariadb to ensure consistent state (optional) rm -rf ${MARIADB_BACKUP_DIR} mkdir -p ${MARIADB_BACKUP_DIR} chmod 700 ${MARIADB_BACKUP_DIR} @@ -60,12 +60,5 @@ then exit 1 fi -# reduce repository disk usage by optimizing the repository storage -if ! borg compact "${REPO}" -then - echo "❌ Backup: borg compact failed on ${HOST}." | go-sendxmpp "${ADMIN}" - exit 1 -fi - # inform admin about success if not exited before echo "✅ System backup succeeded on ${HOST}." | go-sendxmpp "${ADMIN}" -- cgit v1.2.3-70-g09d2