Skip to content
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

Min-Age option for borg compact? #8359

Open
DrMaxNix opened this issue Sep 8, 2024 · 1 comment
Open

Min-Age option for borg compact? #8359

DrMaxNix opened this issue Sep 8, 2024 · 1 comment

Comments

@DrMaxNix
Copy link

DrMaxNix commented Sep 8, 2024

Have you checked borgbackup docs, FAQ, and open GitHub issues?

Yup

Is this a BUG / ISSUE report or a QUESTION?

QUESTION / SUGGESTION

Describe the problem you're observing.

I'm using append-only mode (borg serve --append-only) to be able to roll back changes made by a compromized client system. On the other hand I want to be able to free up unused space using borg compact. But the compact command irrecoverably deletes segments, even ones deleted a few seconds before.
My proposal would be to add a --min-age option to borg compact, which allows to select a duration (eg. 2 weeks) for which segments will be ignored and never deleted. This adds a nice trade of between keeping compromized data (so you have time to detect that ou have been hacked) and not keeping everything forever (after the time duration data will de compacted as normal).
I know that borg does not keep timestamps internally, but as the segment files are stored on disk, the fs will keep track of timestamps when these files have changed.

@ThomasWaldmann
Copy link
Member

I see what you mean.

Guess I won't personally work on this though because:

  • it is quite some work and likely also a bit complex (and dangerous, if done wrong)
  • I rather invest developer time in borg2.
  • borg2 works completely different at that level (no transactions, no log-like append-only segment files, new repository implementation) and does not implement --append-only yet.
  • If --append-only were implemented in borg2, the implementation likely would be very different also from borg1. So, any borg1 code in that area is basically throw-away code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants