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
Backup fails with Fatal: failed to refresh lock in time is host is suspended in the meantime #4274
Comments
I disabled power management and used Incremental backups now run in 4 minutes which is quite good. So happy now! |
Thank you @twaldecker for posting this! I was having the same problem and didn't realize that the laptop was triggering the problem by suspending itself while my initial backup was running; I was searching for other problems before reading this. Same solution worked for me; the initial backup completed without any trouble at all once I set the laptop to never suspend while on AC power. |
I had a similar problem. Ran an initial backup on linux:
using This failed to refresh lock thing may need to be a bit more opportunistic in the case of a suspending system. |
The |
I think we can use the following approach: Once restic detects that it failed to refresh the lock in time, it can create a new lock file, then check whether the current lock still exists in the repository before cleaning up the old lock. This checks that the old lock file was not removed in the meantime, which means that the repository stayed locked all the time. While this lock check takes place, all other backend operations should be paused. For #2736 / #4262 this means that these must delete stale lock files. Just ignoring stale locks would lead to problems with the approach I've just described. |
Output of
restic version
restic 0.15.1 compiled with go1.19.5 on windows/amd64
How did you run restic exactly?
Trying to adopt restic as backup solution, built a rather big filelist which should result in a ~6TB backup.
All paths which should be backed up are local on a windows machine.
What backend/server/service did you use to store the repository?
The backup location is a harddisk plugged in via USB3.1.
Expected behavior
Complete the backup correctly
Actual behavior
Storage space is used, but backup failed and no snapshots are created.
Steps to reproduce the behavior
Currently reproducible on my machine. It was the third try already.
Do you have any idea what may have caused this?
The first try resulted in an error because of virus or potentially unwanted software which should be backed up.
I think this comes from the windows integrated security and is correct as it contains indeed samples.
There is also windows power management which suspends after short period of time. I disabled it now and try again.
Do you have an idea how to solve the issue?
no
Did restic help you today? Did it make you happy in any way?
Not today and not yet, but I hope so in the future. Thanks for restic!
The text was updated successfully, but these errors were encountered: