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

Please add a way to keep backups independently of pruning retention policy #8205

Open
LaurentBonnaud opened this issue May 2, 2024 · 2 comments

Comments

@LaurentBonnaud
Copy link

Hi,
I am using borg prune to reduce the disk space used by my backups.
I would like to be able to mark some backups as "not prunable" so that they are excluded from the daily/weekly/monthly retention policy that I defined.
My use case for this new feature is to keep a last backup of my system before a major OS upgrade. Those upgrades are done at a point in time that is unrelated to weeks and months.
Thank you for considering this suggested addition!

@LaurentBonnaud
Copy link
Author

This feature request is related to issue #846, but is more limited in scope and should be easier to implement.

@ThomasWaldmann
Copy link
Member

ThomasWaldmann commented May 2, 2024

You can already do that by using --prefix with prune. Then simply rename the archives you do NOT want to get deleted so that they do NOT match the prefix any more.

E.g.

borg prune --dry-run --list --prefix server-backup- ...

To keep, rename archives to keep-server-backup-* .

When experimenting with prune, always use --dry-run --list for test runs before running it without --dry-run to avoid unintended data loss.

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