-
-
Notifications
You must be signed in to change notification settings - Fork 752
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
Add borg prune --keep-all
#6656
Comments
Considering that the default is to erase anything that is not explicitly kept, changing the behaviour for giving no Yeah, we could add a BTW, way more important is that you still use the right |
Just to clarify, I didn't mean to suggest that. My description might have given a false impression about that, sorry for the misunderstanding.
Indeed. I chose to use
Thanks for the heads up! Since I use a distinct Borg repo for my manual backups it doesn't really apply to my personal use case, but you're right, for Borg repos with multiple backup sets it definitely makes a huge difference. #edit: It's |
… for borg-prune. Fixes borgbackup#6656
… for borg-prune. Fixes borgbackup#6656
/kind enhancement
I have created a Borg repo that I use for manual backups only. Since I don't have a retention policy for this Borg repo either, I don't run
borg prune
at the moment. However, I just noticed thatborg prune
has another feature besides removing old archives according to a retention policy: removing old checkpoints.Since checkpoints aren't listed by
borg list
by default, quite a lot of checkpoints can accumulate before one notices it.Right now I can't easily remove just old checkpoints from a Borg repo; passing no
--keep-*
option toborg prune
yields the error:One can work around this error by using a very large number for
--keep-last
, e.g.--keep-last 1000000000
. Another solution is to mimicborg prune
's behaviour by usingborg list --consider-checkpoints
, a littlesed
magic andborg delete
.IMO this is a reasonable use case and Borg should support it without taking such workarounds.
Thus I'd like to suggest adding a
--keep-all
option toborg prune
, specifically tellingborg prune
not to remove any actual archive, but just old checkpoints as explained before. Passing--keep-all
with any other--keep-*
option should probably thrown an error.The text was updated successfully, but these errors were encountered: