Hello,
Last night I ran a backup for which I forgot to exclude a directory (~500Mb). I did not want to leave that data in the repository, so I executed a forget
on that snapshot only. After that I executed a prune
: there were no errors
resticbkp@picloud:~ $ restic -r repository/morgoth prune
repository 8fe564d8 opened successfully, password is correct
counting files in repo
building new index for repo
[0:11] 100.00% 17932 / 17932 packs
repository contains 17932 packs (161945 blobs) with 84.270 GiB
processed 161945 blobs: 0 duplicate blobs, 0 B duplicate
load all snapshots
find data that is still in use for 53 snapshots
[0:34] 100.00% 53 / 53 snapshots
found 158592 of 161945 data blobs still in use, removing 3353 blobs
will remove 0 invalid files
will delete 113 packs and rewrite 0 packs, this frees 512.030 MiB
counting files in repo
[0:01] 100.00% 17819 / 17819 packs
finding old index files
saved new indexes as [7db67b69 c2b34ea6 04c757fd 1b3093b5 aa617f3d 93915c80]
remove 92 old index files
[0:00] 100.00% 113 / 113 packs deleted
done
resticbkp@picloud:~ $
I then executed a check --read-data
and I got 3 errors about Pack ID does not match:
Pack ID does not match, want a3f75476, got 7015676c
Pack ID does not match, want 005a0a28, got 23cc97ee
Pack ID does not match, want 2118dddb, got 31bd9e31
At this point I was still working locally on my Raspberry Pi 4. Just to be sure I stopped the Pi and connected the disk to my PC (Fedora Linux 31) for further verifications.
I executed a fsck
and it did not find any error. I executed check --read-data
again and it found the same pack in error. Using resitc 0.9.6 on both OS. I normally backup my Linux PC to the Pi using rclone
and SFTP
In the past months I did execute check --read-data
on few occasions. I check the repositories on a monthly basis. I also checked that repository when I moved it to a new SSD. The result of the all of the previous check showed no errors. The first errors appeared after the forget
and prune
that I did today.
I was able to find the 3 packs with restic find --pack <id>
. I won’t paste it here because the packs are found in many blobs. All I can say is that those packs were found in snapshots no older than 2 weeks.
I rebuilt the index and ran a new check and I got errors on the same packs.
I tried to verify the checksum: the filename does not match the checksum. If I remember it should match
23cc97eebcfa1b15ab275a25fb186273e4f3fc8d5580526a5a96fcc24487418e ./morgoth/data/00/005a0a28be2de035325a6d71e53249369e7ea735dafed564e3e91a8ae40d7b99
7015676ce037f8c33f323f4886a85c5bb6c1dc2a9b7b20753b86e44dfe1f696e ./morgoth/data/a3/a3f754764caff69ae4f8ff31d9ad029ac3252d034a5203b2bdf472d5d27b4885
31bd9e31aaceb9a72917f50103063052658564f40673e35de8503192e10a6dec ./morgoth/data/21/2118dddbfbfbfb99aabf2f04a851ddee5dcf65d334cf0ffa6aa2ccc4e9f42d6d
I do rememer my Pi crashing twice this month with this new SSD but there was no application accessing the repository. I also had to run fsck
to fix errors. I wonder if it could be a bad SSD, but I have no idea how to verify that.
Any idea of what is happening ? Is there anyway to recover/repair this repository ?
Thanks