"List(index) returned error, retrying - invalid argument" error on check, backup, etc


I’ve searched for threads containing similar problems, and despite been able to find some of them, none helped me to solve this problem, unfortunately, so I would love to count with your help, if possible.

My restic backups (the repo is on a USB SSD drive) were running fine until yesterday. Today these errors started happening, on checks, backups and all other operations, for one repo specifically.

The errors are similar to the one below:

repository 43d9c83a opened (version 2, compression level auto)
loading indexes...
List(index) returned error, retrying after 634.387052ms: lstat /run/media/user/SSD_Externo_Sandisk/Backups_Diarios_Locais-Restic/index/6a5388cb0c79e36971581fda9302c8249da5cf21746b5afa5830cfc03752e467: invalid argument
List(index) returned error, retrying after 966.534528ms: lstat /run/media/user/SSD_Externo_Sandisk/Backups_Diarios_Locais-Restic/index/6a5388cb0c79e36971581fda9302c8249da5cf21746b5afa5830cfc03752e467: invalid argument
List(index) returned error, retrying after 1.432060946s: lstat /run/media/user/SSD_Externo_Sandisk/Backups_Diarios_Locais-Restic/index/6a5388cb0c79e36971581fda9302c8249da5cf21746b5afa5830cfc03752e467: invalid argument

I tried to run restic repair index and restic rebuild-index, but the error still happening after hitting ENTER.

Someone has some idea about how to troubleshoot this, please?

P.S.: sorry, I forgot to mention. I am using Linux (EndeavourOS) and restic 0.16.4.

Can you manually access the problematic file /run/media/user/SSD_Externo_Sandisk/Backups_Diarios_Locais-Restic/index/6a5388cb0c79e36971581fda9302c8249da5cf21746b5afa5830cfc03752e467?

Please run fsck for the USB SSD drive.

So, the problem is that there’s no such file there. :frowning:

I don’t understand. Are you saying that the file does not exist? What is the output from ls -la /path/to/index/folder for that folder?

Restic only tries to access an index file if the OS states that the file is part of the index folder. If the file is listed as part of the folder, but cannot be accessed, then this is a filesystem problem that must be fixed using fsck.

Yes. Despite restic mentioning that path/file in the errors, there’s no such file there.

This command, for example:

ls -la /run/media/user/SSD_Externo_Sandisk/Backups_Diarios_Locais-Restic/index/6a5388cb0c79e36971581fda9302c8249da5cf21746b5afa5830cfc03752e467

Returns the following output:

ls: não foi possível acessar '/run/media/user/SSD_Externo_Sandisk/Backups_Diarios_Locais-Restic/index/6a5388cb0c79e36971581fda9302c8249da5cf21746b5afa5830cfc03752e467': Argumento inválido

As well as the following command and output:

ls -la /run/media/user/SSD_Externo_Sandisk/Backups_Diarios_Locais-Restic/index/

It returns:

ls: não foi possível acessar '/run/media/user/SSD_Externo_Sandisk/Backups_Diarios_Locais-Restic/index/6a5388cb0c79e36971581fda9302c8249da5cf21746b5afa5830cfc03752e467': Argumento inválido
total 2088
drwx------ 1 user user    4096 fev 16 09:56 .
drwxr-xr-x 1 user user    4096 jan 24 16:30 ..
-r-------- 1 user user    7188 fev  9 14:40 22cb0fc512058a0af53d5fbc4d8c055f5f8aa599b148f660247a0d58065e00ac
-r-------- 1 user user    1805 fev  5 14:40 40ed942b9c95791389fc6e30aac35458fe03402a47bde98bd0f18eb125c75baf
-r-------- 1 user user     594 fev  5 09:40 40f56e5dccb607e5d7ebf3976d9a40b81d5017611d41859e5a747cbf21a51440
-r-------- 1 user user    1270 fev  4 09:40 4904b9f1b15003664fdaf9f9a1c3c1fc843a81a05d42185bc44269cfe5bcfddf
-r-------- 1 user user    1688 fev  8 09:56 4b7c15236ba1ff4cfdb98418fbef1992238457c35b7e1ee512035afde6375bfb
-r-------- 1 user user    1844 fev  7 14:40 4fe85cff3e21b51fe837974b76aab8d8bd1a8b2744ae052a4bb10a5db967b44a
-r-------- 1 user user     505 fev  9 16:10 6651989ccc1d0488fbef6cdac71d043d94d9d9932288a78a0168d948ee32a177
-????????? ? ?         ?               ?            ? 6a5388cb0c79e36971581fda9302c8249da5cf21746b5afa5830cfc03752e467
-r-------- 1 user user 2090265 fev  2 15:01 73f4ba8d4365088de7b95517139a72e1f415f0801d5bf240b40ae7a5e91764c2

So maybe this can be some kind of disc error.

@Reiner_Sanders As suggested by Michael twice now, you should run fsck on that filesystem. This looks like an issue with your system (or you are looking in the wrong place when you list the files).

1 Like

Yes, I have done that. Already started another repo and now everything seems to be fine.

1 Like