[Borgbackup] Finding exclusive lock files

Stan Armstrong mfseeker at gmail.com
Fri Jan 29 10:12:41 EST 2016


Yes, I had found those locations, but I was unaware of the borg 
break-lock command. That's exactly what I was hoping for. It is a great 
time-saver. Thanks for implementing it.

On 29/01/16 10:44 AM, Thomas Waldmann wrote:
> 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.
>



More information about the Borgbackup mailing list