-
-
Notifications
You must be signed in to change notification settings - Fork 742
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Patternfile doesn't seem to work with relative paths #6231
Comments
|
After re-reading the docs a few times, I think I understand.
Is that correct? Also, I assume that specifying multiple roots works the same way. The docs don't seem really clear on that specific part. |
Yeah, the paths you give on the cmdline are the same as the recursion roots (R). |
This was confusing to me too. It seems natural for relative path patterns to be relative to the nearest root, allowing things like:
The confusing part in the docs is the sentence "Borg always stores all file paths normalized and relative to the current recursion root". In the example above, the recursion root is Rather, the docs should say "Borg always store all file paths normalized and relative to the first directory in the current recursion root". So Anyhow, I hope relative includes/excludes can be supported one day. |
Also, in the docs, the sentence "If you give
This might be a bug though. No path normalization is being done (in 2.0.0b6 anyway). I can get the exclude to work with:
|
At Guess the exclude behaviour needs checking, that looks unexpected. |
I just check current master branch code and it also behaves like seen in #6231 (comment) . Also, 1.2-maint current code behaves the same. |
Have you checked borgbackup docs, FAQ, and open Github issues?
Yes
Is this a BUG / ISSUE report or a QUESTION?
Question
System information. For client/server mode post info for both machines.
Arch linux
Your borg version (borg -V).
1.1.17
Operating system (distribution) and version.
Hardware / network configuration, and filesystems used.
Zfs
How much data is handled by borg?
None
Full borg commandline that lead to the problem (leave away excludes and passwords)
borg create --list --dry-run --patterns-from patternfile ~/borgrepo::test
Patternfile:
Directory structure:
Describe the problem you're observing.
In the patternfile, after specifying a root with
R
, exclusion rules still require an absolute path.With the setup described above, I would expect dir1 not to be backed up, and only includeme to be backed up, and not excludeme.
What actually happens is that everything is backed up:
Can you reproduce the problem? If so, describe how. If not, describe troubleshooting steps you took before opening the issue.
The patternfile only works if all the paths are absolute. This becomes a problem, since some of my paths are very long.
The docs seem to suggest that using
R
sets a root from which rules apply from, which doesn't seem to be happening.The text was updated successfully, but these errors were encountered: