How to either partal prune, or reduce risk of failure?

Is there a possibility to do a “partial” prune? My situation is that for #reasons that are unimportant, I have a backup hosted on Backblaze/B2, and a prune will take about 7 days to complete.

I don’t mind spending the time to do it, but I’d like to not have to rely on a machine being “up” that long; I’m in the SE US, and we’re hurricane/tropical storm season, so we have higher than normal network and power outages now.

Is there a way to “partially” prune so that I could do some of that every so often?

Possible other solution - if a prune gets interrupted for some reason, does the next invocation pick up where it left off, or does it have to start over; if so then it may not matter for me.

Possible other solution # 2 - I can “prune” from any machine that has the right auth to the backup repo, right? I don’t need to do it from the machine that is being backed up? If that’s the case I can also spin up a cheap cloud VM, run the prune from there, and kill it when done - they have a better chance of not dying due to network or power issues than anything I run from home.

Thoughts welcome.

Solution #2 will work. You will need to provide the app-key for B2 and the repo-password.


Since restic 0.12.0 there’s the --max-repack-size option for prune. That way you can e.g. limit the amount of data that should be rewritten by prune. If prune fails somewhere in the process, then the next invocation has to start over.


This worked a treat. In fact, my ~7 day prune from home on a 75/15 Mbit link was done in like 6 hours from a cloud VM (digital ocean to backblaze).

What does that mean, practically? If I set an (absurdly) low max-repack-size, does that mean it just does prune/repacks in smaller atomic units, so less would have to be redone if it fails? Or does it just not prune as much overall, or ???

It limits how many packs (in terms of size) are rewritten in one prune invocation. If more data has to be rewritten, then you have to run prune several times. In essence that has the effect that a single prune invocation takes less time, such that only a smaller amount of work is lost if it fails.


Makes sense, thanks.