Skip to content
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

Confusing meaning of relative patterns #3306

Closed
Code7R opened this issue Nov 10, 2017 · 1 comment
Closed

Confusing meaning of relative patterns #3306

Code7R opened this issue Nov 10, 2017 · 1 comment

Comments

@Code7R
Copy link

Code7R commented Nov 10, 2017

Hi,

I see a usability issue in borg-patterns(1) manpage. The explanation talks in lengths about how the behavior is when user specified a selector prefix. What does not tell you is what happens if no selector is specified (which is apparently a valid thing, reading the second paragraph).

And what does happen in this case?
Are relative names ok? (relative to source folder)
Are directory names ok? (skipping whole directory contents, of course)

That is not clear. I had to find it out by trial-and-error and this is something I don't like to rely on.

And the result came a bit surprising. Imagine a sample usecase - making backups of a portable harddisk which gets different mount points here and there. Now I stored an "exclude-patterns.txt" on that disk which contains three folder names (just the names). And I run borg like:

src=/media/mountpoint; borg create --exclude-from $src/exclude-patterns.txt borgfolder::$(date +%F) $src

Result: the pattern didn't match anything.

Maybe it was matching those relative to $CWD? Who knows, but it does not look right.

@ThomasWaldmann
Copy link
Member

Let's check https://borgbackup.readthedocs.io/en/1.2.4/usage/help.html :

  • pattern style prefix default: fm: and sh: say what options use them by default.
  • docs now also tells how the paths going into the matcher look like and that patterns need to match these paths.

Thus, I'm closing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants