De-duplicate *_preserve and *_preseve_min
I had quite a hard time understanding the difference between the *_preserve and *_preseve_min config options after misunderstanding them in the beginning.
After reading them in more detail now, I don't understand why this differentiation even exists. AFAICS, by just always having one of them and allowing the values all|latest|no|<retention_policy>, all use cases covered at the moment would then be achievable as well.
As a result, configuration would be much easier and less error-prone.
Sorry for the late reply, I kind of missed that one.
The difference is that one defines a duration in which to keep all backups (e.g. if you run btrbk manually, you might want to keep all those backups for a certain amount of time), and the other defines a point in time for which the backups should be preserved (e.g. one backup per week).
From the man-page:
Retention policies are defined individually for snapshots,
backups and archives (summarized as "backups" in the following
text), using a combination of:
*_preserve_min all|latest|no|<number>{h,d,w,m,y}
Amount of time (duration) in which all backups are preserved.
*_preserve no|<retention_policy>
Schedule (single points in time) for which individual backups are preserved.
After at least a year of using btrbk, I've only just noticed the (duration) versus (single points in time) distinction, i.e. the latter involves a set of snapshot types (daily, weekly, etc.) with a retention COUNT for each - meaning that pruning is often discontiguous in what it deletes - whereas the former is just a contiguous timespan from now()-span .. now() in which to delete all snapshots. Could that be clarified in the documentation? I can submit a PR if you like.