diff options
author | xengineering <me@xengineering.eu> | 2023-07-20 21:43:36 +0200 |
---|---|---|
committer | xengineering <me@xengineering.eu> | 2023-07-20 21:43:36 +0200 |
commit | 22afeafecab0b061b549320f994e38fc9e4c9e56 (patch) | |
tree | 05b314dd890946f9eebe4f365549263e2fc4b8bc /backup.sh | |
parent | 52c82c11001604ddc6243e1455b5c576fca4bc3e (diff) | |
download | scripts-22afeafecab0b061b549320f994e38fc9e4c9e56.tar scripts-22afeafecab0b061b549320f994e38fc9e4c9e56.tar.zst scripts-22afeafecab0b061b549320f994e38fc9e4c9e56.zip |
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.
Diffstat (limited to 'backup.sh')
-rwxr-xr-x | backup.sh | 9 |
1 files changed, 1 insertions, 8 deletions
@@ -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}" |