WARNING: Circular directory structure

I discovered I was accidentally backing up a backintime backup that was in progress. I’ve excluded those folders, used rewrite with --forget, run prune for good measure, and run check, which passed. My backup is still bloated, and in trying to find what is taking so much space, I used mount, then ran du -sh on the snapshot folders. I receive the following error on several files.

TLDR; is this normal?

Thanks!

du: WARNING: Circular directory structure.
This almost certainly means that you have a corrupted file system.
NOTIFY YOUR SYSTEM MANAGER.
The following directory is part of the cycle:
  '2023-03-03T01:00:08-05:00/var/lib/docker/overlay2/jak8tec8etrji19r732d6fnpt/diff/usr/local/lib/python3.10/site-packages/notebook/notebook'

Edit: similar messages from the find command:

find: File system loop detected; ‘2023-03-05T09:35:00-05:00/usr/share/pocketsphinx/model/en-us/en-us’ is part of the same file system loop as ‘2023-03-05T09:35:00-05:00/usr/share/pocketsphinx/model’.
find: File system loop detected; ‘2023-03-05T09:35:00-05:00/usr/share/doc/texlive-doc/context/third/enigma/enigma’ is part of the same file system loop as ‘2023-03-05T09:35:00-05:00/usr/share/doc/texlive-doc/context/third’.
1 Like

Not a solution to your problem but i would like to understand why did you choose to rewrite and not just forget the entire snapshot?

Regardless you can still run restic diff to list added content, maybe combined with restic ls.
This way you could avoid using the mount alltogether.

I’m new to restic, so the goal of my post was to find out if this is normal, or if I’ve done something wrong.
I suspect it has to do with symlinks and the way snapshots are created, but I want to understand what’s going on.

Which restic version are you using? It is impossible to create cycles within the repository format, but it might be possible that some metadata causes du/find to think that they have encountered a cycle.

What does stat problematic/file/name print?

Confirmed as a bug in mount, issue here.

2 Likes