I’ve tried to find how restic locks the repo for different commands (which commands require an exclusive lock, non-exclusive and none) so I can better plan my cron jobs.
It would be very useful if a reference table like this was added to the documentation.
I agree. Here is a table detailing which commands take which type of lock.
Shared locks allow any number of other shared locks to exist at the same time, and these commands typically only read or add data.
Only one exclusive lock can exist at any time, and it must be the only lock. These commands typically delete information from the repository, or otherwise require it to not change at all while they work.
tl;dr: Shared allows other shared stuff to run. Exclusive doesn’t allow anything else to run.