Automatically retry backups for n times #28
Labels
No labels
blocked
breaking
bug
data loss
design finalized
good first issue
new feature area
question / support
security
waiting for response
No milestone
No assignees
6 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
borgmatic-collective/borgmatic#28
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
To handle connection issues (such as SSH's "broken pipe", which you cannot always prevent) you might want to add an option to retry backups (for n times) when they fail.
This is what I've also explained here: https://github.com/borgbackup/borg/issues/636#issuecomment-257319412
Imported from Taiga issue 27 (to do). Created on 2016-10-31T15:55:36+0000 by rugk.
This would be good. Any indication on how this could be setup in the schema?
Simply adding a "num_retry" somewhere around here? https://projects.torsion.org/witten/borgmatic/src/branch/master/borgmatic/config/schema.yaml#L129
Yup, the
storagesection seems like the logical place, given precedent. I might just call itretriesorretries_countthough.Variant idea: Make retrying some number of times the default behavior, and perhaps don't even make it configurable at all; just hard-coded. Rationale: Almost everyone probably wants retrying on, and anyone who really cares about when retries are happening can go spelunking in the logs.
Thoughts? I don't feel super strongly either way.
retrieslooks good to me.+1 to make it some number of retries the default, e.g. 3 sounds reasonable
New
retriesandretry_waitoptions in thestoragesection of configuration should take care of this in the next release, courtesy of @cadamswaite. The default is zero retries, but I'm open to changing that.Just released in borgmatic 1.5.21!
I'm running version 1.5.22 but I get these error messages when using
retriesandretry_wait:The config file looks like this:
What am I doing wrong?
That configuration looks correct to me! Can you confirm the version you're running?
borgmatic --versionshould do it.Yes, it's 1.5.22
In that case, can you try posting your entire (redacted) configuration file and I'll see if I can reproduce the problem? It might be easiest to open a new ticket for that.
@witten I'm very confused and sorry for the noice I've made here. I was just about to start a new issue and while collecting the details and retrying everything, it suddenly started to work without any issue. Although I'm having the error logs and a git repo with all the history for the config files, where nothing has changed since I added the retry settings, it failed yesterday and works correctly now. Performed a few more tests, but I can't explain what was going wrong. I keep monitoring this and get back to a new issue, when something similar should happen again.