One stale lock stays?


I’m testing out restic, and one thing I keep bumping into is that it complains about locks.

using parent snapshot 0b64dd1c

Files:           3 new,     0 changed, 23418 unmodified
Dirs:            0 new,     7 changed,  1635 unmodified
Added to the repo: 3.056 GiB

processed 23421 files, 402.698 GiB in 24:12
snapshot f8ef58d1 saved
unable to create lock in backend: repository is already locked by PID 3261680 on srv by foo (UID 1002, GID 1002)
lock was created at 2022-02-03 16:54:59 (37h29m44.593904323s ago)
storage ID dd179331
the `unlock` command can be used to remove stale locks

Now, this process is no longer there. When I used restic list locks it returned three. I did a restic unlock, and when I list it there’s one left. Is this normal? Is this the lock taken by restic when I issue ‘list locks’?

Yes, you’re spot-on. To stop list creating a lock (which is unnecessary in your case), run restic list locks --no-lock.

1 Like