Refactor the interval-based pruning example#1
Conversation
| 2026-05-28 16:00 is exactly one week before `--since`. Since `create` always | ||
| runs at or after 16:00, the archive created on 2026-05-28 is kept, too. Without |
There was a problem hiding this comment.
"at or after" ensuring the week-old archive is kept isn't quite right since the interval end is compared exclusively to the archive time (and archive time is at the start of the create call). With microsecond precision this might not matter in most cases, but it's worth clearing up either this text and the example -- or maybe this is an argument to make the comparison inclusive such that this wording works.
I think that the exclusive check is technically right, but in practice it might be too much hassle for users.
| Assume today is 2026-06-04 and you always start your backups at 16:00. You have | ||
| been creating backup archives starting at 16:00 on most days going back to late | ||
| 2025. Today, `create` took a little longer than usual. It's 16:12 now and you | ||
| run `prune`. |
There was a problem hiding this comment.
I think an extra intro paragraph to set up the scenario is nice. Just launching into "you start your backups" is a bit abrupt.
| Assume today is 2026-06-04 and you always start your backups at 16:00. You have | |
| been creating backup archives starting at 16:00 on most days going back to late | |
| 2025. Today, `create` took a little longer than usual. It's 16:12 now and you | |
| run `prune`. | |
| Scenario: You use borg to perform daily backups. The changes day-to-day are less | |
| important as time goes on, so to save some storage space you have the older | |
| archives "thin out" over time while keeping most of the recent archives. Your | |
| backup script does `borg create ...` followed immediately by `borg prune ...`. | |
| Assume today is 2026-06-04 and you start your backups at 16:00. You have been | |
| creating backup archives starting at 16:00 on most days going back to late 2025. | |
| Today, `borg create` took a little longer than usual. It's 16:12 now and you run | |
| `borg prune`. |
|
These are good suggestions. If you agree with my comments I'll merge it right in. |
See my review on borgbackup#8775