Very old lock and concerns about restic unlock

Restic only adds data when it’s backing up, it doesn’t modify or remove any. So it’s fine if there are existing locks when you start backing up, and multiple backups can run at the same time.

If you start a prune, that will create a lock that is exclusive such that other parties can’t back up to the repository (since the prune will modify/remove data). If you do that, and the connection is then severed, and the prune is cancelled, then a lock will obviously be left behind.

In this case, you may have a situation where you have to remove the lock, but you should only do so when you know that there’s no current operation going on with the repository, so you don’t e.g. interfere with a prune that’s running.

Make sure you’re using the latest version of restic, which is 0.12.0 as of writing this.

2 Likes