For the reference: restic unlock
will only remove locks it considers stale, which are locks that are older than ~5 minutes. When a process (e.g. backup
or prune
) is running, the lock is replaced every 5 minutes, so this is still safe.
However, I advise people to rather find the source of the lock files in the repo, so that unlock
isn’t needed in a script.