spot check fails when archive use relative source paths #960
Loading…
x
Reference in New Issue
Block a user
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 have a configuration using relative source paths including (.) segment to trigger the "slashdot hack" when borg interprets the recursion roots. The reason for including (.) segment is that borgmatic prefixes recursion roots with the working directory when calling
borg create
and I don't want the working directory in the paths in the archive.spot check fails because the paths in the archive does not include path segments down to the working directory.
Steps to reproduce
Use configuration with relative source paths including a (.) segment.
Rest of configuration, including spot check configuration, is excluded for brevity.
Actual behavior
borgmatic execute
borg create
in/mnt/snapshot
with recursion root path/mnt/snapshot/./source
.borg create
add contents of/mnt/snapshot/source
to archive with paths beginning withsource/
.When spot check is run, borgmatic execute
borg list
with paths beginning with/mnt/snapshot/source/
.borg list
return no hits since the paths don't match any of the paths in the archive.Expected behavior
When spot check is run, borgmatic should execute
borg list
with paths beginning withsource/
.Other notes / implementation ideas
The expected behavior could be accomplished by removing the prefix from spot check candidate paths if the source directory contains a (.) path segment before calling
borg list
.I'm not sure why the recursion roots are prefixed with the working directory when borgmatic creates an archive. Is this necessary?
borgmatic version
1.9.3
borgmatic installation method
Debian package
Borg version
borg 1.4.0
Python version
Python 3.12.8
Database version (if applicable)
No response
Operating system and version
Debian GNU/Linux trixie/sid
Thanks for taking the time to file this!
No, it's not! It's an incidental path transformation in borgmatic as part of processing path globs (
*
). But I'll change this so borgmatic will pass the original source directory to Borg without tacking on the working directory, so it's stored in the archive without that prefix. And I'll see what can be done about the spot check issue as well.Okay, both issues should be fixed in main now. This will be part of the next release. Thanks again!
Released in borgmatic 1.9.6!