I would like to ask a question regarding snapshot retention behavior.
Background:
Previously, I configured a snapshot task to run every 6 hours (starting at 00:00) with a 1-month retention period. Under this policy, I had accumulated over 120 snapshots.
Yesterday, I disabled this task and created a new one. The new task also runs every 6 hours (starting at 00:00), but with a 3-day retention period.
Current Situation:
I noticed today that I now only have 12 snapshots remaining in total. It seems the new retention policy also purged the older snapshots.
Could you please confirm if this is the expected behavior? Does creating a new task with a shorter retention period automatically delete the old snapshots generated by the disabled task?
It does not and that is not the expected behavior.
AFAIK if you disable a snapshot task, not only do they not get removed, it also stops deleting them after the retention perios. So in your case, the 1 month snapshots should be there forever until you manually delete them.
This is a caveat with zettarepl. Not sure it’s “expected”, but it’s a known issue that I pointed out on the old forums. I made that post to inform users about the importance of using unique naming schema for your snapshot tasks, otherwise you risk accidentally destroying snapshots, which is what happened to @RangerInpeach.
Zettarepl is name-based. It doesn’t use a database or metadata. It parses snapshot names to determine whether or not to destroy them.
I wish they had a warning in the UI to inform users about this. Snapshot deletion is a destructive action after all.
See the post on the old forums that I linked to. If it still doesn’t make sense, I can explain it again in here.