Corrupted AWS repository: file "does not exist"

Hello,

I’ve recently discovered an issue with my repository. I had a local repository (now gone) and its copy in AWS (made using rclone sync).

I wanted to rebuild the local repo using local data and the missing data from AWS, but I was told it was practically impossible, so I really need my AWS repo… but it doesn’t work. If I try to read data I always get errors: using listing commands works (snapshots, ls in restic mounted dir, etc…) but as soon as I try to read a file I got I/O errors. A simple restic check is enough to report errors with the data.

I’ve checked in AWS and I’m able to manually download the files that restic cannot get.

For example, restic check complains about

  • Load(<data/7338d69102>, 0, 0) failed: <data/7338d69102> does not exist
    but I can manually download the file 7338d69102a396e4244f819f084f083f097239871d8f4178f25606a350af8c36 from AWS and its contents looks good:
#cat 7338d69102a396e4244f819f084f083f097239871d8f4178f25606a350af8c36 | sha256sum 
7338d69102a396e4244f819f084f083f097239871d8f4178f25606a350af8c36  -

If you need help with a problem, please always include (in your post below this comment section):

• The output of restic version.

restic 0.17.2 compiled with go1.23.2 on linux/amd64

• The complete commands that you ran (leading up to the problem or to reproduce the problem).

a restic check is enough to reproduce the error

• Any environment variables relevant to those commands (including their values, of course).

I’ve set only RESTIC_REPOSITORY, RESTIC_PASSWORD_FILE, AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, RESTIC_CACHE_DIR.

• The complete output of those commands (except any repeated output when obvious it’s not needed for debugging).

# restic check
using temporary cache in /home/restic/.cache/restic-check-cache-1192674016
create exclusive lock for repository
repository 559ce728 opened (version 2, compression level auto)
created new cache in /home/restic/.cache/restic-check-cache-1192674016
load indexes
[0:32] 100.00% 951 / 951 index files loaded
check all packs
check snapshots, trees and blobs
Load(<data/7338d69102>, 0, 0) failed: <data/7338d69102> does not exist
Load(<data/48c1bba5ca>, 0, 0) failed: <data/48c1bba5ca> does not exist
Load(<data/341771415b>, 0, 0) failed: <data/341771415b> does not exist
Load(<data/a07011f9c0>, 0, 0) failed: <data/a07011f9c0> does not exist
Load(<data/66708d5db7>, 0, 0) failed: <data/66708d5db7> does not exist
Load(<data/7338d69102>, 0, 0) failed: <data/7338d69102> does not exist
error for tree 936ff20f:
ReadFull(<data/7338d69102>): <data/7338d69102> does not exist
Load(<data/48c1bba5ca>, 0, 0) failed: <data/48c1bba5ca> does not exist
error for tree 9f063e45:
ReadFull(<data/48c1bba5ca>): <data/48c1bba5ca> does not exist
Load(<data/341771415b>, 0, 0) failed: <data/341771415b> does not exist
error for tree 7898accf:
ReadFull(<data/341771415b>): <data/341771415b> does not exist
Load(<data/0ea432fa93>, 0, 0) failed: <data/0ea432fa93> does not exist
Load(<data/a07011f9c0>, 0, 0) failed: <data/a07011f9c0> does not exist
error for tree 12fd3257:
ReadFull(<data/a07011f9c0>): <data/a07011f9c0> does not exist
Load(<data/3be4e9761a>, 0, 0) failed: <data/3be4e9761a> does not exist
Load(<data/66708d5db7>, 0, 0) failed: <data/66708d5db7> does not exist
error for tree 563e0a2f:
ReadFull(<data/66708d5db7>): <data/66708d5db7> does not exist
Load(<data/b8cb9f8057>, 0, 0) failed: <data/b8cb9f8057> does not exist
Load(<data/5a360b4b1e>, 0, 0) failed: <data/5a360b4b1e> does not exist
Load(<data/b1da15d04b>, 0, 0) failed: <data/b1da15d04b> does not exist
Load(<data/4399a3b67f>, 0, 0) failed: <data/4399a3b67f> does not exist
Load(<data/0ea432fa93>, 0, 0) failed: <data/0ea432fa93> does not exist
— output truncated —
[1:35] 100.00% 240 / 240 snapshots

I’m more than willing to perform tests and manual procedures in order to recover this repository, but I’m stuck at the “does not exist”, since the file is there and it is available.

Please also note the file 7338d69102a396e4244f819f084f083f097239871d8f4178f25606a350af8c36 is in the data directory, not in data/73/ subdirectory.

Thanks,
radel