The backup will be interrupted, but the data that was already uploaded to the repository will not have to be uploaded again on the next run.
Depending on what type of backend you use and how you set up your restic instance, the backup session on the client might continue or retry once the client wakes up again, or it might fail when it detects that it no longer has an active connection to the repo.
Stale locks aren’t uncommon. Please see the documentation for locks for some background on how locks work in restic.
If the client just ran a backup, it will have created a non-exclusive lock, which will not prevent it or other clients to back up to the repository. Whether or not the client continues the backup when it wakes up depends on the type of backend, as I mentioned above.
If you run a prune
, restic will create an exclusive lock, which means that other clients may not write to the repository anymore. I’m not sure what happens if a client went to sleep and then wakes up and meanwhile there has been an exclusive lock created, but I would think that it detects this when attempting critical operations. Someone else will have to chime in though. Personally, I make sure that when I run prune, the client won’t be accessing the repo.
I wouldn’t be too worried, but instead of saying too much and potentially wrong things I hope someone else can chime in.