When running a backup script through a scheduled Jenkins job on many servers, I receive the following error on borg create command:
Failed to create/acquire the lock /path/to/repo/lock.exclusive (timeout).
terminating with error status, rc 2
OS : Ubuntu 18.04 Bionic and Ubuntu 20.04 Focal
Borg version: 1.1.15
PS: I had tried some solution like borg break-lock, and upgrade the borg version to the latest 1.1.17 and same problem
Update:
Fixed adding --max-lock-wait 3600 to borg create command to increase lock-wait timeout by default it is 2 seconds, Thanks to ThomasWaldmann from BorgBackup community.
https://github.com/borgbackup/borg/issues/6047#issuecomment-967092381