Borg: Failed to create/acquire the lock ...8ee53ed8/lock.exclusive

Created on 15 Mar 2017  路  6Comments  路  Source: borgbackup/borg

i have a system which often reboots/crashes (due to power loss) and 3 of 5 backups weren't working yesterday, and the logs show:

Failed to create/acquire the lock /backup/nixcloud-backup/.borg-cache/e4f72857fd062fadead393dd604d052d018ba6e3f115fb23f3bf7dcd8ee53ed8/lock.exclusive (timeout).
borg error, exiting

can removal of these files be automated? one could write the PID into the lockfile somewhere and check if the process is still around.

Most helpful comment

I believe you need borg break-lock

All 6 comments

I believe you need borg break-lock

can removal of these files be automated? one could write the PID into the lockfile somewhere and check if the process is still around.

that feature is in beta

@enkore: any pointers? i need that, too...

@rpodgorny maybe wait until 1.1.0b4 gets released. only for testing yet, don't use it for important data.

In 1.1.0b3:

automatically remove stale locks - set BORG_HOSTNAME_IS_UNIQUE env var to enable stale lock killing. If set, stale locks in both cache and repository are deleted. #562 #1253

one could write the PID into the lockfile somewhere and check if the process is still around.

Actually I wrote a script to do something like that locally. I think this is a nice and reliable workaround. See https://github.com/rugk/borg-cron-helper

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rugk picture rugk  路  4Comments

phdoerfler picture phdoerfler  路  6Comments

depresnak picture depresnak  路  6Comments

zatricky picture zatricky  路  3Comments

ThomasWaldmann picture ThomasWaldmann  路  6Comments