Pack ID does not match - Repository corrupted?

The prune run which you’ve posted, shouldn’t be the reason for the damaged pack files. restic just deleted a bunch of packs, but didn’t rewrite any packs. As the pack error shows up on both your raspberry and the PC, it looks like the pack files were somehow damaged. But as restic does not modify already existing packs, I would assume that the actual culprit is something else.

As prune seems to be able to access all tree blobs, the damaged packs probably contain data blobs. You could try the following, which should be able to recover the missing blobs and repair the repository if the corresponding files are still in the folders you backup: Create a copy of the index folder of your repository along with the three damaged packs. Then remove the three packs from the data folder. Run restic rebuild-index to recreate the index and thus remove the removed packs from the index, then run restic backup --force ... to let restic rescan the backup folders. If restic found all the missing data blobs, then restic check --read-data should complete successfully now.

Otherwise you could also remove the affected snapshots and let prune cleanup the repository afterwards.

1 Like