Skip to content

Add quarterly pruning strategy.#8337

Merged
ThomasWaldmann merged 3 commits intoborgbackup:1.4-maintfrom
cr1901:prune-quarterly
Aug 21, 2024
Merged

Add quarterly pruning strategy.#8337
ThomasWaldmann merged 3 commits intoborgbackup:1.4-maintfrom
cr1901:prune-quarterly

Conversation

@cr1901
Copy link
Copy Markdown
Contributor

@cr1901 cr1901 commented Aug 16, 2024

This implements and would close #4750 as described. It works for my use case, but is not ready to be merged due to no tests and docs, and there are subtleties to be addressed wrt what a quarter year actually means.

To do:

  • Split into --keep-3monthly (using the same logic --keep-monthly does) and --keep-13weekly (using the ISO 8601 week-based year), maybe get rid of the latter entirely.
  • Tests
  • Docs

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Aug 16, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.50%. Comparing base (adf2d8c) to head (0e07ab4).
Report is 8 commits behind head on 1.4-maint.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@              Coverage Diff              @@
##           1.4-maint    #8337      +/-   ##
=============================================
- Coverage      82.69%   82.50%   -0.20%     
=============================================
  Files             38       38              
  Lines          11045    11070      +25     
  Branches        2122     2128       +6     
=============================================
- Hits            9134     9133       -1     
- Misses          1345     1368      +23     
- Partials         566      569       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Copy Markdown
Member

@ThomasWaldmann ThomasWaldmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extending the tests would be good, so this code gets executed and tested.

@cr1901
Copy link
Copy Markdown
Contributor Author

cr1901 commented Aug 19, 2024

Feedback addressed, tests are coming along and should be done soon (30 mins?).

@cr1901 cr1901 marked this pull request as ready for review August 19, 2024 21:49
@cr1901
Copy link
Copy Markdown
Contributor Author

cr1901 commented Aug 20, 2024

@ThomasWaldmann Okay to merge if you don't have additional changes requested.

@ThomasWaldmann
Copy link
Copy Markdown
Member

Same here: port to master required after merge, port to 1.2-maint is very optional, considering this is new functionality and 1.2-maint will be phased out in a while.

@ThomasWaldmann ThomasWaldmann merged commit 81cb1cd into borgbackup:1.4-maint Aug 21, 2024
@ThomasWaldmann
Copy link
Copy Markdown
Member

@cr1901 Thanks!

@ThomasWaldmann
Copy link
Copy Markdown
Member

I'll do the master port now.

ThomasWaldmann pushed a commit to ThomasWaldmann/borg that referenced this pull request Oct 5, 2024
Add 13weekly and 3monthly quarterly pruning strategies.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants