-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
repo gets locked too often preventing simultaneous backups #244
Comments
The Auto Unlock option for the repo is not a solution since this would make the restic forget command unsafe. |
It seems like currently we run One possible solution would be to run For example:
Of course, one option is to just use a separate repo for each host. But deduplication is nice and by using a single repo we get to take advantage of it :) Also, if #221 ever gets implemented, the current design would potentially prevent backups (on the same host) from running in parallel. |
This is tricky, agreed re: more flexible scheduling policies being the long term fix -- this is likely a little ways out. I think for now multiple repos (or careful selection of backup schedules) is the correct way to handle this. I think if using Backrest to backup a large number of systems the right approach for now would be to use retention policy = none and to create a cron script on a single host that does your forget and prune operations. But this is a good bug report -- it's definitely a goal that this should just work entirely within Backrest (e.g. without requiring external scripts). |
Describe the bug
Unlike restic cli, backrest default behavior is to lock the repo, might be due to restic forget(?)
To Reproduce
Steps to reproduce the behavior:
This is fine on small setups since by spanning the cronjobs far enough it leaves time for restic to finish backup and remove the lock. With a high amount of hosts or with frequent backups this ends up failing all the backups.
I guess the issue is that backrest is running restic forget for every backup. And restic forget has to lock the repo to be safe, so a solution could be to move restic forget only in a maintenance cronjob and not at each backup.
Expected behavior
For backups to run on multiple hosts at the same time and only lock the repo when running a maintenance job
Platform Info
The text was updated successfully, but these errors were encountered: