Cannot create lock

Once in a while my backup will not work because the repository is locked:

Fatal: unable to create lock in backend: repository is already locked by PID 28456 on morgoth.home by mcarpentier (UID 1000, GID 1000)
lock was created at 2019-12-17 13:10:24 (49h28m1.353159951s ago)

I’m sure the last backup completed successfully. This repository is only used by me and only one machine will backup to this repository.

I can remove the lock but unless I’m missing something the repository should not be locked after a successful operation. I do not prune the repository.

Using restic 0.9.5 on Fedora 30

$ /usr/bin/restic version
restic 0.9.5 compiled with go1.12.2 on linux/amd64


1 Like

Are you keeping a log file so when this happens you can identify whether the previous process ended unexpectedly?

I ran the same backup to 3 different repository (SFTP, Local and S3) on 2019-12-17. I checked the log for the 3 backups and they all exited with return code 0. The backup was executed manually and I did not notice any error. If I remember the lock error occurred on only one of the three repo.