From: Silvio Rhatto Date: Fri, 11 Jan 2019 12:12:12 +0000 (-0200) Subject: Try to break-lock if backup fails X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=143a633ae3f63ed320dbce466493865306db9e45;p=borger.git Try to break-lock if backup fails --- diff --git a/borger b/borger index 1ba6389..4992bcf 100755 --- a/borger +++ b/borger @@ -154,9 +154,11 @@ function borger_create { backup_exit=$? - #if [ "$backup_exit" != "0" ]; then - # fatal "Error creating snapshot" - #fi + if [ "$backup_exit" != "0" ]; then + info "Error pruning repository" + info "Trying to break the lockfile..." + borg break-lock $BORG_REPO + fi } # Use the `prune` subcommand to maintain daily, weekly and monthly archives.