mirror of
https://github.com/borgbackup/borg.git
synced 2025-03-11 14:48:22 +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
|
||||
|
||||
info "Compacting repository"
|
||||
|
||||
borg compact
|
||||
|
||||
compact_exit=$?
|
||||
|
@ -228,16 +230,14 @@ 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=$(( compact_exit > global_exit ? compact_exit : global_exit ))
|
||||
|
||||
if [ ${global_exit} -eq 1 ];
|
||||
then
|
||||
info "Backup, Prune and/or Compact finished with a warning"
|
||||
if [ ${global_exit} -eq 0 ]; then
|
||||
info "Backup, Prune, and Compact finished successfully"
|
||||
elif [ ${global_exit} -eq 1 ]; then
|
||||
info "Backup, Prune, and/or Compact finished with warnings"
|
||||
else
|
||||
info "Backup, Prune, and/or Compact finished with errors"
|
||||
fi
|
||||
|
||||
if [ ${global_exit} -gt 1 ];
|
||||
then
|
||||
info "Backup, Prune and/or Compact finished with an error"
|
||||
fi
|
||||
|
||||
|
||||
exit ${global_exit}
|
||||
|
||||
Pitfalls with shell variables and environment variables
|
||||
|
|
Loading…
Add table
Reference in a new issue