Merge "borg-backup: prune after successful backup"

This commit is contained in:
Zuul 2021-01-20 23:03:25 +00:00 committed by Gerrit Code Review
commit 8f9abdab26

View File

@ -43,6 +43,13 @@ ${BORG} create \
backup_exit=$?
if [ ${backup_exit} -eq 0 ]; then
info "Running prune"
${BORG} prune --verbose --list --prefix '{hostname}-' \
--show-rc --keep-daily 7 --keep-weekly 4 --keep-monthly 12
backup_exit=$?
fi
if [ ${backup_exit} -eq 0 ]; then
info "Backup finished successfully"
else