Fix(restic) wait between retries

Too quick retry could lead to locking issue.
This commit is contained in:
Nicolas KAROLAK 2018-07-06 10:18:23 +02:00 committed by Jerome Charaoui
parent acee92fef5
commit b09529e96b
2 changed files with 5 additions and 0 deletions

View File

@ -27,6 +27,9 @@ run_backup = yes
# Retry to run the command [integer]
#retry_run = 1
# Seconds to wait between each retry attempts [integer]
#retry_run = 5
# Repository to backup to or restore from [path]
repository = /mnt/backup

View File

@ -16,6 +16,7 @@ getconf run_prune "no"
getconf run_rebuild_index "no"
getconf retry_run 1
getconf retry_wait 5
getconf cacert
getconf cache_dir
@ -74,6 +75,7 @@ function run_cmd {
(( pass++ ))
debug "Attempt $pass"
$1 && break
sleep $retry_wait
done
}