borgbackup / borgbackup/borg

`--bypass-lock` does not work when running with the same `$HOME`

Open
#7,255 2 comments 1 reaction 0 assignees View on GitHub
Dominant language
Python
Stars
13.7k
Forks
875
Avg merge
11h 15m
Merged PRs (30d)
192

Description

## Have you checked borgbackup docs, FAQ, and open Github issues?

Yes

## Is this a BUG / ISSUE report or a QUESTION?

BUG

## System information. For client/server mode post info for both machines.

#### Your borg version (borg -V).

> borg 1.2.2

#### Operating system (distribution) and version.

> NixOS 22.11

#### Hardware / network configuration, and filesystems used.

> Backup via the Borg support of Hetzner Storage box

#### How much data is handled by borg?

> <100GB

#### Full borg commandline that lead to the problem (leave away excludes and passwords)

`sudo -u backup borg --bypass-lock list --json`

## Describe the problem you're observing.

I would expect `--bypass-lock` to allow me query operations while borg is running a backup.
This however only holds true when `$HOME` is not the same between the two processes.

#### Can you reproduce the problem? If so, describe how. If not, describe troubleshooting steps you took before opening the issue.

1. Run a backup that takes a long time
2. **As the same user**, run `borg --bypass-lock list --json`
3. Observe it failing unless you do something like `export HOME=/tmp`

#### Include any warning/errors/backtraces from the system logs

`Failed to create/acquire the lock /var/lib/backup/.cache/borg/5f0ba4dc431985522d752569d25fb5dcbcef8ed01a351711899f334753552422/lock.exclusive (timeout).`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.