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.
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
Most helpful comment
I believe you need
borg break-lock