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

Prune: Keep x per day / week / month, no matter how many in total #8637

Open
TheCataliasTNT2k opened this issue Jan 16, 2025 · 3 comments
Open

Comments

@TheCataliasTNT2k
Copy link

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

Yes

Is this a BUG / ISSUE report or a QUESTION?

ISSUE

System information. For client/server mode post info for both machines.

Your borg version (borg -V)

borg 1.2.8

Operating system (distribution) and version

Linux Mint 20

How much data is handled by borg?

389G

Describe the problem you're observing.

My drive is now full, and I need to remove (prune) old backups.

However, I do not want to only keep the last 14 days, but two backups per week, no matter, how many that would be.
As far, as I understand the documentation, this is currently not possible.
Would it be possible to implement that?

@ThomasWaldmann
Copy link
Member

To free space, you need to run prune and compact.

Don't forget compact, only that will free space (for borg >= 1.2.0).

borg has all sorts of pruning, from secondly to yearly, but there is no "keep 2 per week".

E.g. you could:

  • keep everything within 3 days
  • keep 60 daily backups
  • keep 26 weekly backups
  • keep 36 monthly backups
  • keep 10 yearly backups

Note that keeping backups that are "close" to each other (on the time scale) does not need much space. The more far apart they are, the bigger the differences / the deduplicated size.

@TheCataliasTNT2k
Copy link
Author

TheCataliasTNT2k commented Jan 16, 2025

Would it be possible, to implement that?

In my case, borg can not deduplicate everything, because of InfluxDB, which stores a ton of data every day.

So it would make sense, to remove half of the backups, but not "one half in one chunk" more like "every second backup".

@ThomasWaldmann
Copy link
Member

A lot is "possible", just needs a developer investing time into this. :-)

Would likely make pruning docs / code a bit more complex than it already is though.

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

No branches or pull requests

2 participants