Automatically retry backups for n times #28
Labels
No Label
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 New Issue
No description provided.
Delete Branch "%!s(<nil>)"
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
storage
section seems like the logical place, given precedent. I might just call itretries
orretries_count
though.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.
retries
looks good to me.+1 to make it some number of retries the default, e.g. 3 sounds reasonable
New
retries
andretry_wait
options in thestorage
section 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
retries
andretry_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 --version
should 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.