restic 0.19.1 compiled with go1.26.4 on linux/amd64
I suspect the missing data is from a very old snapshot, unfortunately prune doesn’t say which one it’s working on.
restic -r /path prune -vvvv
repository 97473a5f opened (version 2, compression level auto)
[0:44] 100.00% 816 / 816 index files loaded
loading all snapshots...
finding data that is still in use for 281 snapshots
[31:57] 100.00% 281 / 281 snapshots
searching used packs...
{<data/3c473850> <data/68d100c1> <data/e451ff26> <data/1e6feb34> <data/6e2224b5> <data/6a1ba70a> <data/a76b1bb4> <data/7f778a96> <data/95dafa37> <data/dd00c7db> (30 more)} not found in the index
Integrity check failed: Data seems to be missing.
Will not start prune to prevent (additional) data loss!
Please report this error (along with the output of the 'prune' run) at
https://github.com/restic/restic/issues/new/choose
Fatal: index is not complete
backend is a local zfs filesystem, and I have zfs-level snapshots of the repo. Is there a way to find exactly what data is missing and search for it in an older copy of the repository and inject some old packfiles?
Or I could just drop the broken snapshot if it’s old enough. But to do that I’ll need to know which snapshot is broken.
Not sure how to find out what might be missing in terms of pack files.
But if you’re looking to recover some data you could zfs clone your ZFS dataset and try running restic repair index or restic repair packs on the clone to try regain access to any files that can be recovered (don’t have pieces missing)?
You want to clone first so if anyone can give you a way to recover more data you’ll still have access to the snapshot in its current state, meanwhile the clone will allow you to access at least some of your data to run restic ls or restic find on the contents and see what might be missing that way?
If you have any idea how far back your corruption might have kicked in, you could try just restoring missing pack files from previous snapshots. Again, do this into a clone so you can always throw it away if it causes problems. Restic will ignore pack files that are missing from its indexes, so your goal is just to recover missing pack files so restic can find everything in its index, then when you do a repair and purge it should get rid of any it didn’t need.
Question, first: If a tree is shared between multiple snapshots then restic is correctly detecting that these backups share a filesystem? I know there used to be an issue when backing up a snapshot of a filesystem due to changed filesystem ID.
I’ve done more digging (slowly, every command takes at least a half hour) and I’m finding a concerning trend: all my recent backups are missing blobs from a single file.
tree e9c5183f82b329723552dcc3f2e2d20d00283b0decf0ee9979b2973b2263cd0b: file "<VMNAME>.qcow2" blob 1e6feb341586189bd4e2918b64b2cc51403ec1bc8bbd0d7dda067d1c076053fc not found in index
tree 70f5893b332e5da9e779d7c8a0fb49514d4e6ba75cbf0255b328f526d19a0572: file "<VMNAME>.qcow2" blob 0a08ad8839fd2cb261cd6b70bb5fb7f2d308e536fd98f79b768825231178a19d not found in index
tree 00245e814ed4399f233cc13dced186363d188a7de53acb4a9462401a72613a5d: file "<VMNAME>.qcow2" blob 519a71c8721c9d0f180837e230823bc12e364322eaf35b756ad4581d2ac066f1 not found in index
tree b6116f13da51ff09b52ef68fabba82101c07ad9b022e17af588d4451b04be2d0: file "<VMNAME>.qcow2" blob a1b0ce9b62775bbdc561b453869e96816595de6c8c2fde160da5b2e3eb30cfc7 not found in index
tree 53a292f5c99229b8d2f0d51c587c1f142f6d48f88a55daf1d1106134ca052e0a: file "<VMNAME>.qcow2" blob f0e0295d9aa043856ecb134e528ab01a2fd296cd61fdf7c58b5fceb5799aacd0 not found in index
tree 9eac837dfde2f652355ee4ba83a15289b976cbc2510b294a806c6d7689a366c4: file "<VMNAME>.qcow2" blob 44b9f115ac816cb1196a4963071dec7261a143bc338629a77ed41984e283b5e3 not found in index
So for the past few weeks this has been failing for a single file. Those snapshots were made with restic 0.18.1-dev (compiled manually) which was 0.18.1 plus the following patched in:
I’ve been running it on that machine since febuary so I’m not sure why it just failed. Those were merged into mainline so I upgraded to 0.19.1 (debian package). I’ll check the next backup with a full restore to /dev/null tomorrow.
If that works I can start dropping the corrupted snapshots. I can live with a small gap.
E: Because it was one file, restic mount and a bit of bash scripting to iterate over the snapshots trying to read the first bytes of the file in each got me a list of broken snapshots.
2026-09-12T06:25:03-04:00 <-- Last good snapshot
2026-09-20T06:25:03-04:00
2026-09-27T06:25:02-04:00
2026-09-30T06:25:03-04:00
2026-10-04T06:25:03-04:00
2026-10-11T06:25:02-04:00
2026-10-18T06:25:02-04:00 <-- This one snapshot works for some reason.
2026-10-25T06:25:03-04:00
2026-10-26T06:25:03-04:00
2026-10-27T06:25:02-04:00
2026-10-28T06:25:03-04:00
2026-10-29T06:25:02-04:00
2026-10-30T06:25:03-04:00
2026-10-31T06:25:02-04:00
2026-11-01T06:25:03-05:00
2026-11-02T06:25:03-05:00
2026-11-03T06:25:03-05:00
2026-11-04T06:25:02-05:00
2026-11-05T06:25:02-05:00
2026-11-06T06:25:02-05:00 <-- First good snapshot
Doing some digging, this corresponds exactly with lifetime of my previous boot:
Sep 13 06:55:59 wolf kernel: Linux version 7.1.3 ...
Nov 05 20:05:42 wolf kernel: Linux version 7.3.1 ...
in my estimation, this isn’t a bug in restic but some weird linux glitch of that specific boot. It’s not a bug kernel 7.1.3 since I’ve run that since mid july.
After forgetting those specific broken snapshots restic check comes back clean.