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

[ENH] Option to limit total size using remove increments #911

Closed
evoth opened this issue Aug 12, 2023 · 1 comment
Closed

[ENH] Option to limit total size using remove increments #911

evoth opened this issue Aug 12, 2023 · 1 comment

Comments

@evoth
Copy link

evoth commented Aug 12, 2023

Is your feature request related to a problem? Please describe.

When making incremental backups, my main concern is the total size of the backup, since I want to keep as many increments as can fit on my drive. However, the remove increments --older-than option only accepts a time or number of increments before which to delete them.

Describe the solution you'd like

An option to remove enough old increments so that the total size (of mirror + increments ideally) is below a given number of bytes. This could be implemented as another time format, but that may be awkward.

Describe alternatives you've considered

I've considered using the output from list increments --size to achieve this functionality myself, but unfortunately it's prohibitively slow. It seems to recalculate the size every time, even if no files have changed. Maybe the sizes of the increments could be stored (if they're not already), and there could be a cache for the size of the mirror that's updated whenever a backup is performed.

Sorry if this is out of scope; I'll probably still try to implement this myself somehow since it would be really useful.

@evoth evoth added enhancement triage new issue needing validation labels Aug 12, 2023
@evoth evoth changed the title [ENH] Remove increments option to limit total size [ENH] Option to limit total size using remove increments Aug 12, 2023
@ericzolf
Copy link
Member

Sounds like a duplicate of #281, which isn't going to be implemented any time soon (the time constraints of 'list increments --size` are also internal).
Anyway, what you can do is to remove always the oldest increment until you reach the required free size. If you do this regularly, e.g. after/before each backup, it shouldn't take a lot more time than if the feature would be implemented.

@ericzolf ericzolf added duplicate and removed triage new issue needing validation labels Aug 13, 2023
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