Skip to main content

How to resolve the Borg acquire lock in remote backups.

If you see the following error when listing, restoring, or taking manual backups for your Borg remote backups.
Failed to create/acquire the lock /root/.cache/borg/f80e5dfd25cb9/lock.exclusive (timeout).
You may simply solve it by following the instructions below:
  • You can connect with the VM terminal and run the below command.
borg break-lock BorgRepoName

By using the command, you can determine your BorgRepoName

cd /opt/borg;
cat backupInfo.sh;
#It will return output like these:
BORG_PASSPHRASE=xxxxxxxxxxxxxxxxx borg info ssh://xxxxxxxxxxxx.repo.borgbase.com/./repo;

The ssh://xxxxxxxxxxxx.repo.borgbase.com/./repo; is your borgBorg repo name. You can use that in the command above.

Example: borg break-lock ssh://xxxxxxxxxxxx.repo.borgbase.com/./repo;