-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lstat No Such file or directory #2165
Comments
I just ran into this issue, as a backup operation and a "tar-then-delete" operation ran concurrently. Temporary workaround: Change the timing in cron. As some details were left out, I just re-used the form. Output of
|
I also encounter this. It occurs every time my backup script runs, with the same missing file causing the lstat error each time. The described possible race condition seems likely as the thing I'm backing up is a Time Machine (Mac) sparse bundle, which contains tons of files that may or may not be removed during Time Machine backup. As Time Machine backup occurs approximately every hour, it's probable that restic and Time Machine ran at the same time at one point, causing this. The restic backup seems to complete successfully even though this error is logged. Output of restic version
What backend/server/service did you use to store the repository?Backblaze B2 Expected behaviorNo errors occurring in subsequent backups when a file is removed during a backup. Actual behavior
Steps to reproduce the behaviorSee above posts. Do you have any idea what may have caused this?I also think this could be a race condition. Do you have an idea how to solve the issue?Maybe: In the backup logic, do not assume that a previously discovered file is still present on disk when the backup operation actually starts for that file. If that's the cause of the issue. Did restic help you or made you happy in any way?Of course! It's awesome. I love how similar to git it feels in many ways: file structure on disk, content integrity validation, versioned snapshots with ids, command-line interface, very flexible, etc. Pretty much the only power-user backup tool I tried that I feel I can trust with my data. It's fast too, which has been an issue with many other solutions I've tried. |
We're seeing this behavior quite often on systems where the file-system isn't consistent during backup execution (e.g. no LVM snapshot or alike). I'd very much appreciate if restic would support an option like |
How do you arrive at the conclusion that these errors cause the backup to fail? restic continues with the backup even if some of the files cannot be read. |
@MichaelEischer I might be wrong and the failure might be caused by something else, but our systemd timer service failed as such:
What I also see quite regularly (at another system, running under cron), are changes reported like this:
It would be nice if there'd be an option to not list those either (the restic run is using the |
restic returns exit code 3, in case some files couldn't be accessed during the backup. A fatal backup error returns exit code 1.
These lines are only output by a really old version of restic (before 0.9.0). |
I have seen similar errors in the past, but they were very rare, so I did not care too much, but recently I have added an extension to Firefox, that seemingly creates and deletes files in my Firefox profile directory constantly, so that this error has become a lot more common. If you would add a flag like the proposed |
Related to #3098. |
I wasn't sure if I should've added this to #692 or not, but /proc isn't really a place you want to backup, and this happened on a normal place to backup. I apologize if adding it to that issue was better.
Output of
restic version
restic 0.9.3 compiled with go1.11.1 on linux/amd64
How did you run restic exactly?
From cron:
Stderr output:
What backend/server/service did you use to store the repository?
Azure Blob Storage
Expected behavior
Restic not throwing errors.
Actual behavior
Restic throws this error. The backup still seems to have succeeded.
Steps to reproduce the behavior
Unknown
Do you have any idea what may have caused this?
It seems to me that this file was removed from the file system between when restic found out the file existed and tried to back it up. So a race condition.
Do you have an idea how to solve the issue?
It's hard to tell, especially because you probably want to avoid hiding actual errors. But this error message seems to not be an actual issue, so we probably don't want it logged to the error log.
Did restic help you or made you happy in any way?
Yup, it's the first backup solution I've tried in ages that doesn't feel awful to use :)
The text was updated successfully, but these errors were encountered: