Help with error: `fdopendir: not a directory`

Hi all,

I’m seeing errors when I run restic check or restic rebuild-index but running a backup, listing snapshots and restoring works fine. Is this something I should worry about (it seems so!) and is there anything I can do to recover this backup or do I need to start fresh?

The errors I’m seeing are:

❯ restic -r /Volumes/backup check
using temporary cache in /var/folders/8c/ydz8t7md7pz7gy6k4f3dlgww0000gn/T/restic-check-cache-127483548
repository d5249c9e opened successfully, password is correct
created new cache in /var/folders/8c/ydz8t7md7pz7gy6k4f3dlgww0000gn/T/restic-check-cache-127483548
create exclusive lock for repository
load indexes
check all packs
List(data) returned error, retrying after 552.330144ms: fdopendir: not a directory
List(data) returned error, retrying after 1.080381816s: fdopendir: not a directory
List(data) returned error, retrying after 1.31013006s: fdopendir: not a directory
List(data) returned error, retrying after 1.582392691s: fdopendir: not a directory
List(data) returned error, retrying after 2.340488664s: fdopendir: not a directory
List(data) returned error, retrying after 4.506218855s: fdopendir: not a directory
List(data) returned error, retrying after 3.221479586s: fdopendir: not a directory
List(data) returned error, retrying after 5.608623477s: fdopendir: not a directory
List(data) returned error, retrying after 7.649837917s: fdopendir: not a directory
List(data) returned error, retrying after 15.394871241s: fdopendir: not a directory
fdopendir: not a directory
pack a60f308d: does not exist
pack 2ba4128f: does not exist
pack 6bf9239d: does not exist
pack 7aa392f5: does not exist
.
.
.

I’m on a macOS (11.2.1), the backup is running to an external SSD and restic version gives restic 0.12.0 compiled with go1.15.7 on darwin/amd64.

Many thanks!

Huh, that’s indeed odd. I guess that somehow the subdirs below data/ in the repo (/Volumes/backup/data) are not complete, usually there are sub directories data/00 to data/ff (256 of them). Can you check if some are missing or are not directories at all?

Did you maybe copy the repo from somewhere else and some files/subdirs did not get copied over?

Thanks for the reply. All the 256 directories are there. I moved all of restic’s directories into a subdirectory (/Volumes/backup/restic/) and then back again but that’s the only movement of files I’ve done.

Does any one have a good idea about what I can do here? It seems odd that some of the commands work (specifically restoring) but check and rebuild-index don’t.

Sorry to keep bumping this. This problem is not confined to my initial repository.

I decided to create a new repository but I’m seeing the same problem on new ones too. I tried twice - once on the same external SSD and once to the internal one - same problem on both.

Which filesystem are you using? Have you tried using a different filesystem?

APFS on macOS 11.2.1. No, I haven’t tried it on another file system.

I downgraded to v0.11.0 to see if there was any difference and the problem has gone away so this appears to be something introduced by v0.12.0.

This sounds like a bug. Please open an issue on Github and include as many information as you can for developers to narrow it down.

Thanks. Done - check and rebuild-index error with fdopendir: not a directory · Issue #3302 · restic/restic (github.com)

2 Likes