Commit 9dc9628
fix(backup): prune by timestamp so weekly fulls survive retention
Retention sorted backups lexically by name. Because "logs-full-" sorts
before "logs-incr-" ('f' < 'i') regardless of date, every freshly created
weekly full was treated as the oldest backup and pruned in the same run
that created it. The original base full stayed pinned (protected as the
base of every incremental), so the chain never re-based and incrementals
accumulated as ever-growing deltas — one prod volume reached 420GB / 2.6x
the live data.
Sort local and R2 backup lists by the trailing YYYY-MM-DD-HHMMSS timestamp
instead, so the newest full is correctly the newest entry and ages out only
once its incrementals do.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent c2f37fa commit 9dc9628
1 file changed
Lines changed: 11 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
139 | | - | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
140 | 146 | | |
141 | 147 | | |
142 | 148 | | |
| |||
158 | 164 | | |
159 | 165 | | |
160 | 166 | | |
161 | | - | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
162 | 171 | | |
163 | 172 | | |
164 | 173 | | |
| |||
0 commit comments