Load data returned error

I have a backup here which is causing a bit of trouble. Could just recreate it, but am curious what the problem is?

The backup is on my NAS, which is mounted on my Linux. Is a samba device.

Output from restic command stats

Load(<data/70d9a637a3>, 574, 4310653) returned error, retrying after 735.199502ms: EOF
Load(<data/70d9a637a3>, 574, 4310653) returned error, retrying after 415.490168ms: EOF
Load(<data/70d9a637a3>, 574, 4310653) returned error, retrying after 764.113148ms: EOF
Load(<data/70d9a637a3>, 574, 4310653) returned error, retrying after 1.645137617s: EOF
Load(<data/70d9a637a3>, 574, 4310653) returned error, retrying after 2.934237014s: EOF
Load(<data/70d9a637a3>, 574, 4310653) returned error, retrying after 5.599553557s: EOF
Load(<data/70d9a637a3>, 574, 4310653) returned error, retrying after 4.664239891s: EOF
Load(<data/70d9a637a3>, 574, 4310653) returned error, retrying after 4.307667037s: EOF
Load(<data/70d9a637a3>, 574, 4310653) returned error, retrying after 15.66103274s: EOF
Load(<data/70d9a637a3>, 574, 4310653) returned error, retrying after 28.545826053s: EOF
could not load snapshots: context canceled
error walking snapshot: walking tree bb4c1897220116a6c2a95da8bce275e57706fb9507dac43c53bba4284a42b2c7: ReadFull(<data/70d9a637a3>): EOF

It looks like restic is trying to access a part of a file but does not get any data. Can you run sha256sum and stat on the file data/70d9a637a3* on the NAS as well as on the SMB/CIFS mount?

I guess it’s the SMB mount, we’ve seen similar problems with that in the past. Afterwards, you can try to umount and mount the SMB again. Maybe it works then?

1 Like

From my NAS

root@nas:/samba/Sicherungen/Sicherung_Home_PC/data/70# sha256sum 70d9a637a3*
9e045b63b88b6a204637b0a765db457fc77214e0d774231f625cf9435888d5d3  70d9a637a387ca7142d2d3ab94f31793adcb1318f77b752b7bd3b9b478b51d52
root@nas:/samba/Sicherungen/Sicherung_Home_PC/data/70# stat 70d9a637a3*
 Datei: 70d9a637a387ca7142d2d3ab94f31793adcb1318f77b752b7bd3b9b478b51d52
 Größe: 4194304         Blöcke: 8192       EA Block: 4096   reguläre Datei
Gerät: 254/1    Inode: 19179888    Verknüpfungen: 1
Zugriff: (0764/-rwxrw-r--)  Uid: ( 1000/   frank)   Gid: ( 1000/   frank)
Zugriff: 2023-05-28 12:45:54.609331655 +0200
Modifiziert: 2023-03-12 15:29:53.876771000 +0100
Geändert: 2023-05-20 12:09:24.355939709 +0200
Geburt: 2023-05-20 12:09:24.239938554 +0200

From my mount

frank@debian:/mnt/NAS/Sicherungen/Sicherung_Home_PC/data/70$ stat 70d9a637a3*
 Datei: 70d9a637a387ca7142d2d3ab94f31793adcb1318f77b752b7bd3b9b478b51d52
 Größe: 4194304         Blöcke: 8192       EA Block: 1048576 reguläre Datei
Gerät: 0/59     Inode: 19179888    Verknüpfungen: 1
Zugriff: (0755/-rwxr-xr-x)  Uid: ( 1000/   frank)   Gid: ( 1000/   frank)
Zugriff: 2023-05-28 12:45:54.609331600 +0200
Modifiziert: 2023-03-12 15:29:53.876771000 +0100
Geändert: 2023-03-12 15:29:53.876771000 +0100
Geburt: 2023-05-20 12:09:24.239938500 +0200

There’s something odd: restic expects the SHA256 hash of the file to start with 70d9a637a3 but it got different data back (hash starts with 9e045b63b8).

Can you also run sha256sum on the NAS? so we can find out where the data is modified (at rest, in transit, in memory of the NAS?)

NAS

root@nas:/samba/Sicherungen/Sicherung_Home_PC/data/70# sha256sum 70d9a637a3*
9e045b63b88b6a204637b0a765db457fc77214e0d774231f625cf9435888d5d3  70d9a637a387ca7142d2d3ab94f31793adcb1318f77b752b7bd3b9b478b51d52

Mount

frank@debian:/mnt/NAS/Sicherungen/Sicherung_Home_PC/data/70$ sha256sum 70d9a637a3*
9e045b63b88b6a204637b0a765db457fc77214e0d774231f625cf9435888d5d3  70d9a637a387ca7142d2d3ab94f31793adcb1318f77b752b7bd3b9b478b51d52

Hm, then it’s not the SMB mount, so it’s likely either the RAM or the storage in the NAS where data got modified. On the NAS you can try to purge the disk cache via echo 3 > /proc/sys/vm/drop_caches and then run sha256sum again. Maybe that’ll give you the correct data…

Nothing changed after

echo 3 > /proc/sys/vm/drop_caches

I think i will remove this backup and create a new one.
@fd0 Thanks

Hm, it looks like the file was truncated: In the log above we can see that restic tries to load 4.310.653 bytes starting at offset 574, but according to the stat call the file is only 4.194.304 bytes long. Maybe it got truncated while restic was writing it?

Are there other files which also have errors as reported by restic check? Or is this the only one?

Return from check

pack 70d9a637a387ca7142d2d3ab94f31793adcb1318f77b752b7bd3b9b478b51d52: unexpected file size: got 4194304, expected 4831841
Load(<data/70d9a637a3>, 607, 4312138) returned error, retrying after 670.949363ms: EOF
Load(<data/70d9a637a3>, 574, 4310653) returned error, retrying after 414.561179ms: EOF
Load(<data/70d9a637a3>, 1433, 4317504) returned error, retrying after 390.857123ms: EOF
Load(<data/70d9a637a3>, 574, 4310653) returned error, retrying after 932.599355ms: EOF
Load(<data/70d9a637a3>, 607, 4312138) returned error, retrying after 1.036858254s: EOF
Load(<data/70d9a637a3>, 1433, 4317504) returned error, retrying after 746.519976ms: EOF
Load(<data/70d9a637a3>, 574, 4310653) returned error, retrying after 750.710405ms: EOF
Load(<data/70d9a637a3>, 1433, 4317504) returned error, retrying after 1.406715709s: EOF
Load(<data/70d9a637a3>, 607, 4312138) returned error, retrying after 1.066913661s: EOF
Load(<data/70d9a637a3>, 574, 4310653) returned error, retrying after 1.184963426s: EOF
Load(<data/70d9a637a3>, 607, 4312138) returned error, retrying after 1.723257516s: EOF
Load(<data/70d9a637a3>, 1433, 4317504) returned error, retrying after 2.384977844s: EOF
Load(<data/70d9a637a3>, 574, 4310653) returned error, retrying after 2.407259019s: EOF
Load(<data/70d9a637a3>, 607, 4312138) returned error, retrying after 1.767276239s: EOF
Load(<data/70d9a637a3>, 1433, 4317504) returned error, retrying after 3.153458652s: EOF
Load(<data/70d9a637a3>, 574, 4310653) returned error, retrying after 4.531418226s: EOF
Load(<data/70d9a637a3>, 607, 4312138) returned error, retrying after 5.682123975s: EOF
Load(<data/70d9a637a3>, 1433, 4317504) returned error, retrying after 2.972992486s: EOF
Load(<data/70d9a637a3>, 574, 4310653) returned error, retrying after 6.333269956s: EOF
Load(<data/70d9a637a3>, 1433, 4317504) returned error, retrying after 7.16860928s: EOF
Load(<data/70d9a637a3>, 607, 4312138) returned error, retrying after 3.670209384s: EOF
Load(<data/70d9a637a3>, 607, 4312138) returned error, retrying after 6.018826767s: EOF
Load(<data/70d9a637a3>, 574, 4310653) returned error, retrying after 5.529689875s: EOF
Load(<data/70d9a637a3>, 1433, 4317504) returned error, retrying after 9.523945662s: EOF
Load(<data/70d9a637a3>, 607, 4312138) returned error, retrying after 9.453282991s: EOF
Load(<data/70d9a637a3>, 574, 4310653) returned error, retrying after 13.185268184s: EOF
Load(<data/70d9a637a3>, 1433, 4317504) returned error, retrying after 12.695715942s: EOF
Load(<data/70d9a637a3>, 607, 4312138) returned error, retrying after 11.597744782s: EOF
Load(<data/70d9a637a3>, 574, 4310653) returned error, retrying after 9.728767636s: EOF
Load(<data/70d9a637a3>, 1433, 4317504) returned error, retrying after 24.701168258s: EOF
error for tree 5df50ec3:
  ReadFull(<data/70d9a637a3>): EOF
error for tree 7640662f:
  ReadFull(<data/70d9a637a3>): EOF
error for tree 1e80aa3b:
  ReadFull(<data/70d9a637a3>): EOF
Load(<data/70d9a637a3>, 4831841, 0) returned error, retrying after 670.562669ms: ReadFull: unexpected EOF
Load(<data/70d9a637a3>, 4831841, 0) returned error, retrying after 854.265886ms: ReadFull: unexpected EOF
Load(<data/70d9a637a3>, 4831841, 0) returned error, retrying after 861.464417ms: ReadFull: unexpected EOF
Load(<data/70d9a637a3>, 4831841, 0) returned error, retrying after 1.226723198s: ReadFull: unexpected EOF
Load(<data/70d9a637a3>, 4831841, 0) returned error, retrying after 3.230313955s: ReadFull: unexpected EOF
Load(<data/70d9a637a3>, 4831841, 0) returned error, retrying after 2.103689853s: ReadFull: unexpected EOF
Load(<data/70d9a637a3>, 4831841, 0) returned error, retrying after 5.391156145s: ReadFull: unexpected EOF
Load(<data/70d9a637a3>, 4831841, 0) returned error, retrying after 8.967072573s: ReadFull: unexpected EOF
Load(<data/70d9a637a3>, 4831841, 0) returned error, retrying after 11.489822224s: ReadFull: unexpected EOF
Load(<data/70d9a637a3>, 4831841, 0) returned error, retrying after 28.730696486s: ReadFull: unexpected EOF
pack 70d9a637a387ca7142d2d3ab94f31793adcb1318f77b752b7bd3b9b478b51d52 failed to download: StreamPack: ReadFull: unexpected EOF
Fatal: repository contains errors

Repo deleted and do a new one. Now is all fine.

using temporary cache in /tmp/restic-check-cache-3525107230
reading repository password from stdin
create exclusive lock for repository
load indexes
check all packs
check snapshots, trees and blobs
[0:00] 100.00%  1 / 1 snapshots

read 50.0% of data packs
[1:49] 100.00%  646 / 646 packs

no errors were found

Truncated files for backups via CIFS/SMB remind me of restic fails on repo mounted via CIFS/samba on Linux using go 1.14 build · Issue #2659 · restic/restic · GitHub as these are one possible manifestation of that issue.

1 Like