[Borgbackup] Finding exclusive lock files

Thomas Waldmann tw at waldmann-edv.de
Fri Jan 29 09:44:50 EST 2016


On 01/29/2016 03:35 PM, Stan Armstrong wrote:
> I know that exclusive locks can be found in two places (as per the
> documentation at
> http://borgbackup.readthedocs.org/en/0.29.0/internals.html?highlight=locks:
> 
> the cache locks are at ~/.cache/borg/REPOID/lock.*
> and the repository locks are in repository/lock.*.
> 
> I am running a simple home LAN with two machines to be backed up both
> locally and to the other machine. Even confining my question to local
> backups on each machine, I have two .cache directories, one for root and
> one for each local user. Each repository contains several archives;
> therefore there are several subdirectories in each place, each of which
> must be manually opened to find whether it contains a lock.exclusive file.
> 
> Is there a simpler way of determining where exclusive locks might be?
> ("find" takes too long.)

Well, it is deterministic, so you don't need "find".

The repo lock is always in the repo you use, so that should be pretty clear.

The cache lock is always in ~/.cache/borg/<REPOID> - you can find out
the repoid in the repo's "config" file (look into the repo directory).
~ refers to the home directory of the user running borg.
That might be root or a normal user, depending on how you invoke borg.

If you use the "borg break-lock" command, both locks will be
automatically broken / removed. Just make sure first that the locks are
erroneous and they are not from a still running borg process.

-- 

GPG ID: FAF7B393
GPG FP: 6D5B EF9A DD20 7580 5747 B70F 9F88 FB52 FAF7 B393



More information about the Borgbackup mailing list