snapshotter

The weekly snapshot that would not die

2026-10-02 · A retention bug that only showed up twice a year.

Since 0.2 a few users reported eight weekly snapshots with weekly=7. It turned out to be daylight saving time: the retention code bucketed snapshots by local week, and the week containing the DST switch was 167 or 169 hours long. A snapshot taken at 02:30 on the switch night landed in two buckets.

The fix in 0.3.2 buckets by UTC and only formats in local time for display. The lesson is the usual one: keep time in UTC everywhere except the last line of output.

$ snapshotter prune --dry-run
keep   2026-10-25T03:00Z  weekly
keep   2026-10-18T03:00Z  weekly
drop   2026-10-26T01:30Z  (was weekly: DST duplicate)