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 . . .
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.
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.