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

understanding target_preserve_min #578

Open
DrTron opened this issue Dec 29, 2023 · 0 comments
Open

understanding target_preserve_min #578

DrTron opened this issue Dec 29, 2023 · 0 comments

Comments

@DrTron
Copy link

DrTron commented Dec 29, 2023

All,
I'm trying to keep backups as defined in the retention policy. For that I have:
target_preserve 7d 4w 6m

What I don't understand is the target_preserve_min section in btrbk.conf. The manual says:

target_preserve_min all|latest|no|<number>{h,d,w,m,y}
Preserve all backups for a minimum amount of hours (h), days (d), weeks (w), months (m) or years (y), regardless of how many there are. 
If set to “all”, preserve all backups forever. 
If set to “latest”, always preserve the latest backup (useful in conjunction with "target_preserve no", if you want to keep the latest backup only). 
If set to “no”, only the backups following the target_preserve policy are created. Defaults to “all”.

So in my use case I would set it to "no", to only keep the backups as per the retention policy.
However, that results in no backups being run, only the snapshots on the source drive are.
If I set it to "all", the default, I think I would end up with no backups being purged ever. If set to "latest", it would purge all backups except for the latest one.

So what is the correct setting?

Thanks!

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

1 participant