]> gitweb.fluxo.info Git - borger.git/commitdiff
Try to break-lock if backup fails
authorSilvio Rhatto <rhatto@riseup.net>
Fri, 11 Jan 2019 12:12:12 +0000 (10:12 -0200)
committerSilvio Rhatto <rhatto@riseup.net>
Fri, 11 Jan 2019 12:12:12 +0000 (10:12 -0200)
borger

diff --git a/borger b/borger
index 1ba6389b7ec20a6d6552d0c609048dd6f99d8d03..4992bcf6c36b6adf5dc6e0a48087b2c368e7038b 100755 (executable)
--- 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.