The problem is that if this error happens (e.g. on folder “Profile”) then Restic cannot find the subfolders/files below (e.g. “Firefox”) which results in a partial backup.
I investigated further:
The error is not consistent and does not happen every time. What I also found is that this error mostly happens in top folders, e.g.
The problem:
The files/subfolders descending into /c/ are not detected and are not part of backup.
Sometimes all folders /a/, /b/, /c/, etc. have errors.
The backup is written to snapshot ABC.
This causes another problem:
The next backup uses ABC as parent which hat 0 files below /c/ folder. If there is no error 524 this time and the /c/ folder works, Restic will detect all the files below as new (because they don’t “exist” in backup ABC, which causes the backup to run for very long time filling the log with
new /mnt/windows/c/file1.html 0 bytes added
new /mnt/windows/c/folder/ 0 bytes added
new /mnt/windows/c/folder/file2.html 0 bytes added
Of course Restic deduplicates the files correctly because they exist somewhere in older snapshots.
The snapshot is now DEF. The next time restic runs, the errors 524 don’t matter and snapshot GHI is written.
So every 2 snapshots there is a long backup which reads all (in reality unchanged) files as new and the next one created is “faulty”, which caues next to do full read, etc. etc.
I will try to find out more and maybe downgrade and see if this happens in older versions too.
Maybe this is all related to the known GO bugs
I will also run a full check with --read-data and see if this detects anything
If the repo size is 500 GB with 1000 snapshots and I use this parameter, how much data will Restic read? 500 GB or 1000x500 GB?
@uok Can you test whether restic 0.9.6 (or use a restic version built with Go 1.13) also has the errno 524 problem? That errno could mean “not supported” but it is so uncommon, that go has no string representation for it… For now it’s probably best to also add the problems you’re seeing to issue 2659, if it turns out to be unrelated we can still split it off later on.
--read-data will read every (physical) file in the backup storage once. In your example that would be the 500GB.
Could you test whether the current master branch also works without specifying nouser_xattr? #1800 should have been fixed by https://github.com/restic/restic/pull/3034 by now.