Open zilexa opened 3 years ago
I'm afraid this is not possible. It's probably worth considering such an option, but I fear that it would make things very complicated and confusing (I believe this was discussed in some issue already, can't find it right now).
The solution is pretty simple: make a snapshot at midnight (or whatever yout preserve_hour_of_day
config is).
I am a bit afraid to use snapshot_preserve_min 1d, I don't want btrbk to destroy all preserved snapshots and backups, only the older ones from today.
If you change snapshot_preserve_min from "latest" to "1d", it won't destroy more snapshots. In the contrary, it would keep all the backups from one day back, in addition to the snapshot_preserve settings.
I am also very afraid to us snapshot_preserve_min no, because the documentation states
You can't set snapshot_preserve_min to "no". The latest snapshot always needs to be preserved.
... and sorry for the late reply, I'm very busy these days...
(I believe this was discussed in some issue already, can't find it right now)
Also discussed in https://github.com/digint/btrbk/issues/413
btrbk runs nightly, but sometimes I manually run it during the day. When I do that, I do not want to have multiple snapshots & backups:
Per day, I only want to keep the latest. But I still want btrbk to follow my retention policies (for example preserve snapshots of the past 6 days, past 3 weeks, past 2 months). Just not keep more than 1 backup per day in the snapshots dir and on the targets, if btrbk runs >1 times on a day, only preserve the latest one of that day.
snapshot_preserve_min
andtarget_preserve_min
set tolatest
. But that doesn't seem to do the trick.snapshot_preserve_min 1d
, I don't want btrbk to destroy all preserved snapshots and backups, only the older ones from today.snapshot_preserve_min no
, because the documentation statesThat would do the opposite: preserve the first of the day (2021053) instead of the last of the day (20210531_2).
This is what my config looks like. A few default settings are the same for my system backup but I wasn't sure if they would be inherited properly so I just added them in there as well.