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

Documentation for exclude patterns needs improvements (more examples) #1487

Closed
ametzler opened this issue Dec 17, 2017 · 2 comments
Closed

Comments

@ametzler
Copy link

Hello,

Output of restic version

restic 0.8.0
compiled with go1.9.2 on linux/amd64
Hello,
as a first time user I have a hard time finding out how exactly --exclude works. The docs are very terse.

Experimenting found the following specifics:
Matching is against a complete pathname component (subdirectory name or filename) (foo does not match xfoo, it matches /1/2/foo, /foo/1/2 and /1/foo/2.

Slashes require some care:
Trailing slashes are ignored. "file/" matches a file named "file"
A leading slash anchors the string, the top path component has to match. e.g. assuming we are backing up /tmp/xxx-input and want to exclude /tmp/xxx-input/foo/file2. ...

  • These patterns work: tmp xxx-input foo file2 /tmp/xxx-input/foo/file2 /tmp/xxx-input/foo /tmp/xxx-input /tmp xxx-input/foo.
  • These don't: /xxx-input /foo /file2 /xxx-input/foo

Is there anything else I have missed? I can try to come up with a patch for the docs, but only after my understanding has been improved. ;-)

@fd0
Copy link
Member

fd0 commented Dec 17, 2017

Thanks for taking the time to report this. It's actually a duplicate of #396, there you can find several issues with examples. I haven't had the time yet to distill these into the docs.

I'm closing this issue as a duplicate.

@fd0
Copy link
Member

fd0 commented Dec 17, 2017

Especially, #1005 has many examples.

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

No branches or pull requests

2 participants