Forget policy -

Since I’m writing, I actually have two related thoughts/questions:

First, are there any ballparks for how many snapshots are too many? I’ve seen some discussions about forget/prune taking a long time, but on my 40gb backup it has always seemed to go very smoothly.

Second, there is one small problem with how the forget policy is implemented, which applies to my use case of irregular backups (I’m backing up a laptop, so it’s not always on). Which means that my -H30 sometimes span a bit over a day, but sometimes they span a lot more than that. What I want is to keep all hourly snapshots younger than a specific age (relative to the newest snapshot).

So I’ve been looking into implementing a --keep-hourly-within switch, allowing me to specify, for example: --keep-hourly-within=2d (any hourly backups younger than 2 days would be kept, regardless of how many hourly backups have been made in that period). To me this feels like a more natural way to specify the policy.

I’m hoping that this would be seen as a useful addition to restic. Any thoughts on whether this would be a good feature? Would a different syntax be preferrable? We’d start by submitting an issue on github, before submitting the pull request, but it seems the forum is a good place to float early stage ideas.