-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Increase the granularity of the "keep within" snapshot retention policy #2090
Conversation
I didn't add new tests covering the change to snapshot_policy_test.go yet because I'm not sure about how to generate the testdata. |
Codecov Report
@@ Coverage Diff @@
## master #2090 +/- ##
==========================================
- Coverage 50.78% 46.65% -4.14%
==========================================
Files 176 176
Lines 14165 14169 +4
==========================================
- Hits 7194 6610 -584
- Misses 5920 6565 +645
+ Partials 1051 994 -57
Continue to review full report at Codecov.
|
7861138
to
ecedbf3
Compare
Nice idea, I like it! Add the tests to |
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.
Add the tests, then I think this change is good to be merged. Thanks!
Make restic forget --keep-within accept time ranges measured in hours and choose accordingly which snapshots to keep and which to forget. Add relative tests.
ecedbf3
to
3edc723
Compare
@fd0 I just pushed a modified commit that also add tests. Also, in the option description wasn't "older" supposed to be "newer"? |
Huh, I think you're right! |
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.
LGTM, thanks!
What is the purpose of this change? What does it change?
Increase the minimum granularity of the time ranges accepted by the
restic forget --keep-within
command from a daily granularity to an hourly granularity.Was the change discussed in an issue or in the forum before?
Yes, in issue #2089.
Checklist
changelog/unreleased/
that describes the changes for our users (template here)gofmt
on the code in all commits