Pruning Command

I don’t really understand pruning so I’ll just ask here.

I want to keep only 2 revisions at a time (a new revision is made every Sunday). If a third revision is formed, I want the older of the two original backups to be removed. How would I do this using pruning?

Since you create new revision every week, you could do something like this: prune -keep 0:14 -keep 1:7. Explanation is here: Prune command details

Alternatively, you could get list of revisions and then prune all but last two.

The important question is why do you want to do that? New revisions don’t take space if data hasn’t changed and it does not sound productive to keep deleting old revisions. If you want to do that to satisfy some data retention requirements – this would not be enough as bits and pieces of “deleted” revision will still persist in shared chunks.

I mean, its just easier for me really to have two revision. Other than ease, there’s not really much reason to do so.

I don’t see how is that easier.

In fact, I don’t see any upsides to pruning so aggressively - neither from performance nor cost nor functional perspective. But I do see at least one massive downside: What if the corruption (to your irreplaceable family photo) occurs silently and you don’t notice it immediately, but discover, say, three months down the road? Then you don’t have a good version to restore from.

Keep long (infinite) version history. You don’t have to keep hourly snapshots of course for years, configure prune. Say, keep hourly backups for a week, daily backups for three months, and then weekly backups forever. Or just never prune. That is a valid approach as well. I don’t prune my photo collection backup. Why would I?

1 Like