Help with: Fatal load <index/....>: invalid data returned

My repository is failing to load its index. I noticed that my backups were failing so I tried:

$ restic check
using temporary cache in /tmp/restic-check-cache-693508726
repository f913a463 opened successfully, password is correct
created new cache in /tmp/restic-check-cache-693508726
create exclusive lock for repository
load indexes
error: error loading index 88364fea: load <index/88364fea54>: invalid data returned
Fatal: LoadIndex returned errors

So then I tried:

$ restic rebuild-index
repository f913a463 opened successfully, password is correct
loading indexes...
Fatal: load <index/88364fea54>: invalid data returned

So, now I need to ask for advice on how to proceed . . .

Thanks!

Here is a similar topic:

Which backend do you use to store the repository?

As check fails to load the index, it seems that the index file in the repository is broken. Just delete the file in the index folder whose name starts with 88364fea54 and the run rebuild-index.

rebuild-index --read-all-packs would probably also work, but would be much slower.

1 Like

Thanks. I thought that might be the answer, but I wanted confirmation before trying it. I’ll do that now.

I’m using ssh/sftp to a private server.

Yes! Simple and that solved the issue. I’ll know for next time.

I guess rebuild-index reported a few not indexed pack files? Probably the sftp connection was interrupted during the upload which can leave incomplete index files behind.

Yes, there were about 50 “adding file pack to index” reports. It’s a pretty big repo (about 600GB) but it only took 10 minutes tops.