This might be a noobie question, but I want to understand the logic behind locks.
Are there any advantages of locks besides allowing for parallel backup operations from several clients? So, if I have a local computer-to-HDD backup which I run on one machine at a time, and 99% of the time it’s the same host backing up the same paths, does it even make sense to lock the repository?
You are entirely right that the main use case for the locks is to prevent accidental multi-client use of the repository in cases where such usage might be problematic (whether it is depends on what the clients actually do with the repository).
You are also right that if you know for sure that you are only running one restic client at a time with that repository, then there’s no use in the locking. At the same time, the locks don’t cost anything so it’s not like they are generally a problem.