I do a single backup every day. I want to keep one backup one day old and one backup one week old. forget with -w2 does’t work because:
All the --keep-* options above only count hours/days/weeks/months/years which have a snapshot, so those without a snapshot are ignored. (here)
That means, if I start daily backups, forgetting with -w2, there is one backup in the past week and none in the week before that, so that earlier week is ignored. I’ll be left with only the most recent (daily) backup, and I’ll never get the week-old backup.
The only thing I can see to do is collect 8 daily backups, and then start the forget/prune procedure. But this seems nuts. If, for example, I wanted to run monthly backups and keep one yearly and one monthly, I’d have to keep monthly backups for 13 months until running a policy of -y2 would work. This can’t be how the policy is expected to be applied, can it?
btrbk’s retention policy makes sense to me. Unless I’m entirely minunderstanding, restic’s seems broken.