aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2019-01-11 10:12:12 -0200
committerSilvio Rhatto <rhatto@riseup.net>2019-01-11 10:12:12 -0200
commit143a633ae3f63ed320dbce466493865306db9e45 (patch)
treea1b5f498ecc376997ec9e1f072fc8b2788d65232
parent5fa663e49458cd4c98b685940633c1934bccb737 (diff)
downloadborger-143a633ae3f63ed320dbce466493865306db9e45.tar.gz
borger-143a633ae3f63ed320dbce466493865306db9e45.tar.bz2
Try to break-lock if backup fails
-rwxr-xr-xborger8
1 files changed, 5 insertions, 3 deletions
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.