[Bug] source_directories_must_exist does not expand globs and tildes #682
Labels
No labels
blocked
breaking
bug
data loss
design finalized
good first issue
new feature area
question / support
security
waiting for response
No milestone
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
borgmatic-collective/borgmatic#682
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What I'm trying to do and why
I am trying to add
source_directories_must_exist: trueto my existing Borgmatic config so I can make use of this feature. However I any directories with globs or tildes are not being expanded and always fail the existence check.Steps to reproduce (if a bug)
Add source directories with globs and tildes while enabling
source_directories_must_exist.Example config file:
Removing
source_directories_must_existresolves the issue.Actual behavior (if a bug)
Expected behavior (if a bug)
A successful backup of source directories containing globs and tildes, as was the case before adding
source_directories_must_exist.Other notes / implementation ideas
Seems no expansion is being done during the existence check.
so should be a simple matter to fix:
Happy to open a pull request to fix and add a unit test.
Environment
borgmatic version: 1.7.12
Use
sudo borgmatic --versionorsudo pip show borgmatic | grep ^Versionborgmatic installation method: pip
Borg version: 1.2.1
Use
sudo borg --versionPython version: 3.10.6
Use
python3 --versionDatabase version (if applicable): n/a
Use
psql --versionormysql --versionon client and server.operating system and version: Ubuntu 22.04.2
Good catch! I think your analysis is completely correct here. And yes, I'd welcome a PR if you're up to it.
This was just released in borgmatic 1.7.13!