I have seen a lot of issues/questions about inconsistent indexes and use of rebuild-index and prune to make sure the restic repository is in a healthy state with no unneeded or redundant data, etc.
I have to admit, it’s not entirely clear to me what should be done in the case of interrupted backups or restores.
What is the recommended procedure when restic backup is interrupted?
What is the recommended procedure when restic restore is interrupted?
Assume a network link dies, but could be anything I guess. Drive is unplugged, etc.
Even after a backup or restore completes, what should be done to ensure the backup/restore is successful?
Hm, I think you’re right, these cases aren’t explained in the manual. In addition, we need to rethink the error messages check prints. For example, the message “file <1234> is not referenced in any index” is not critical at all, it could easily be suppressed and the next run of prune will take care of it.
Just re-run the backup, it’ll pick up approximately where it left of. A small amount of duplicate data is left in the repo from the previous run, most already uploaded data is reused automatically. The next rune of check will likely print messages like the one above, the next run of prune will take care of the additional files.
Restart the restore process from the beginning in a new directory (or remove the files). There’s currently no resumption for restoring files. We may eventually add this, but it’ll require some complexity, and, to be honest, it’s down below somewhere on our todo list.
I hope this helps! I’d be happy to merge this in a PR, adding some text to the manual and/or improve the message check prints.
Please up-vote features you’re interested in on the Github bug tracker. We don’t keep track of feature requests in the forum. (That’s not to say that we ignore them, but the Github issues are much better suited for that task).