Restic unlock automation

unlock removes locks that are older than 30 minutes or if created by the local host, if the corresponding restic process no longer runs. Thus in most cases calling unlock should do everything you need. Just make sure that you use restic >= 0.10.0. For older restic versions, the timestamp in the lock file is not properly refreshed.

unlock --remove-all is somewhat dangerous, unless you can 100% guarantee that no other restic processes are accessing that repository.

1 Like