-
Notifications
You must be signed in to change notification settings - Fork 32
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
Support lock-wait
with --lock-retry
in restic 0.16
#240
Support lock-wait
with --lock-retry
in restic 0.16
#240
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #240 +/- ##
==========================================
+ Coverage 77.39% 77.46% +0.07%
==========================================
Files 93 93
Lines 10034 10120 +86
==========================================
+ Hits 7765 7839 +74
- Misses 2004 2015 +11
- Partials 265 266 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
4146b08
to
bec6b32
Compare
Also supporting custom overridden "lock-retry" values by getting the time restic waited on the lock from restic itself
bec6b32
to
ebb5df9
Compare
02ba3f3
to
b4086c8
Compare
What is your configuration to activate the My brain is a bit foggy because of a cold, but still, I haven't managed to generate the |
Get well soon! My config was nothing more than this: profile:
initialize: true
repository: test-repo
password-file: test-repo.key
force-inactive-lock: true
(... and restic 0.16 in the path) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works all fine now 👍🏻
I agree the arguments layer is getting messy and needs a bit of refactoring
Thanks 😉
This PR leverages the newly added restic 0.16 flag
--lock-retry
to offload some of the remote lock retry logic to restic (sequences of up to 10 minutes).This should lower resource usage (no startup overhead) and allow faster retry cycles (managed by restic itself).
Had also relaxed the stale lock age (the time that a remote lock must not have been refreshed before resticprofile attempts to unlock). Restic allows ~10 minutes and maybe less if host is the same, resticprofile's new min is 15m and default 1h for automatic
unlock
.Example: