Closed witten closed 6 days ago
Relevant code:
https://github.com/borgbackup/borg/blob/2.0.0b12/src/borg/repository.py#L211
Guess we need to move lock creation to after trying to read config/readme
- the readme contents is currently used to determine whether there is a borg repository.
Or maybe even to after the version check right after that.
If there is no repo yet (or it is a unsupported repo version), it will abort there, before creating the lock.
The lock itself is removed by the context manager, but not the containing directory.
Thanks!
Have you checked borgbackup docs, FAQ, and open GitHub issues?
Yes.
Is this a BUG / ISSUE report or a QUESTION?
BUG / ISSUE
System information. For client/server mode post info for both machines.
Your borg version (borg -V).
Client: Borg 2.0.0b12 (only using Borg locally for this ticket)
Operating system (distribution) and version.
Manjaro stable 24.1.1
Hardware / network configuration, and filesystems used.
Lenovo X1 Carbon, no network, ext4
How much data is handled by borg?
None.
Full borg commandline that lead to the problem (leave away excludes and passwords)
Describe the problem you're observing.
After the above commands:
It appears that either Borg or rclone are leaving behind an empty locks directory within the previously non-existent repo path. This is a problem because borgmatic uses
repo-info
to probe for whether a repo exists prior to runningrepo-create
—butrepo-create
fails if anything already exists in the repo path. Therefore this locks directory prevents borgmatic's use ofrepo-create
from ever succeeding.The
repo-list
subcommand also leaves behind a locks directory.Can you reproduce the problem? If so, describe how. If not, describe troubleshooting steps you took before opening the issue.
Yes.
Include any warning/errors/backtraces from the system logs
Note that the traceback itself is probably fixed in #8475.