mirror of
https://github.com/borgbackup/borg.git
synced 2025-03-12 07:08:47 +00:00
Docs: Improve logging in example automation script (#4226)
docs: improve logging in example automation script * add an info entry for the compacting step * add a final info entry for successful completion
This commit is contained in:
parent
9e05bf9cde
commit
b311b62e0d
1 changed files with 9 additions and 9 deletions
|
@ -220,6 +220,8 @@ backed up and that the ``prune`` command is keeping and deleting the correct bac
|
||||||
|
|
||||||
# actually free repo disk space by compacting segments
|
# actually free repo disk space by compacting segments
|
||||||
|
|
||||||
|
info "Compacting repository"
|
||||||
|
|
||||||
borg compact
|
borg compact
|
||||||
|
|
||||||
compact_exit=$?
|
compact_exit=$?
|
||||||
|
@ -228,14 +230,12 @@ backed up and that the ``prune`` command is keeping and deleting the correct bac
|
||||||
global_exit=$(( backup_exit > prune_exit ? backup_exit : prune_exit ))
|
global_exit=$(( backup_exit > prune_exit ? backup_exit : prune_exit ))
|
||||||
global_exit=$(( compact_exit > global_exit ? compact_exit : global_exit ))
|
global_exit=$(( compact_exit > global_exit ? compact_exit : global_exit ))
|
||||||
|
|
||||||
if [ ${global_exit} -eq 1 ];
|
if [ ${global_exit} -eq 0 ]; then
|
||||||
then
|
info "Backup, Prune, and Compact finished successfully"
|
||||||
info "Backup, Prune and/or Compact finished with a warning"
|
elif [ ${global_exit} -eq 1 ]; then
|
||||||
fi
|
info "Backup, Prune, and/or Compact finished with warnings"
|
||||||
|
else
|
||||||
if [ ${global_exit} -gt 1 ];
|
info "Backup, Prune, and/or Compact finished with errors"
|
||||||
then
|
|
||||||
info "Backup, Prune and/or Compact finished with an error"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
exit ${global_exit}
|
exit ${global_exit}
|
||||||
|
|
Loading…
Add table
Reference in a new issue