Restic check reports `error for tree... node "static" with invalid type "irregular"`

I’ve used restic for years by now and it has always printed out a warning for two symlink paths created under Windows WSL. During backup restic has been reporting these symlinks similar to this (output has changed during different restic versions):

error: incomplete metadata for <FULL_PATH_OF_SYMLINK1>: unsupported file type "irregular"
error: incomplete metadata for <FULL_PATH_OF_SYMLINK2>: unsupported file type "irregular"

I’ve pretty much ignored these messages since it has seemed that even though they’re reported as error restic process still exits with a success code and I don’t care that there are any problems with backing up these symlinks themselves.

However, now after running restic check after a successful restic forget --prune restic reports like this:

Checking... <REPO>
error for tree 66a53220:
  tree 66a53220d226393b59a946063f725ed875ff9169a75e33e9a41d0012acd71dfb: node "<SYMLINK1>" with invalid type "irregular"
error for tree d565f127:
  tree d565f12751994132e9f4a4405c73ebbfbce3edef746957ecf37010a2fa69cb86: node "<SYMLINK2>" with invalid type "irregular"

The repository is damaged and must be repaired. Please follow the troubleshooting guide at https://restic.readthedocs.io/en/stable/077_troubleshooting.html .

Fatal: repository contains errors

And restic exits with non-zero exit code. I have a strong suspicion that this change started with version 0.17.1, because I did not see this behavior with version 0.17.0 (I have outputs available from these periods). With 0.17.0 restic check didn’t even complain about these symlinks when running restic check.

My first question is - should I be worried about this message “The repository is damaged and must be repaired” in this situation and if yes then what should I actually do? Another question is - has this change been intentional where restic started to exit with non-zero exit code with this situation?

Output of restic version:
restic 0.17.1 compiled with go1.23.1 on windows/amd64.

1 Like

Hello!
Check:

In my case the error was because I was including the Dropbox cache in the backup. Before I didn’t get an error. I excluded that folder and everything was fine.

This is a bug in restic, which will be fixed in the next patch release: backup: fix handling of files with type irregular by MichaelEischer · Pull Request #5057 · restic/restic · GitHub

1 Like