I have a backup repository that is slightly damaged that I would like to recover, rather than start over from scratch. The backup source is a remote machine with almost 2TB of data being backed up at a max rate of 1MB/s (2/3 of the max outgoing bandwidth) so the initial backup took more than a month. (The data doesn’t change much, so incremental backups are quick.)
The target is minio on a server local to me. The server shut down uncleanly, and now a
restic check --read-data (running directly on the server) reports a few packs which
failed to download: StreamPack: ReadFull: unexpected EOF. I have addressed the underlying problem on the server, and now want to repair the repository.
The backup source does not need to be restored right now. I just want the next snapshot to fill in the now-missing files so that I again have a consistent repository.
I don’t see an option to have restic automatically delete damaged packs as part of either
restic check or
restic repair — it looks like it can remove records of entirely missing packs, but I have to find and delete damaged packs manually from the underlying storage for
restic repair index and
restic repair snapshots --forget to give me a consistent repository to which the next backup snapshot should fill in all the current files.
While I’ve been manually deleting truncated packs so far, is there an option I’ve missed that would have allowed a one-shot “delete all corrupted packs” to speed up this kind of recovery?