mirror of
https://github.com/octoleo/restic.git
synced 2024-12-23 03:18:55 +00:00
add documentation for --exclude[-file] and patterns
This commit is contained in:
parent
1c1eacfc94
commit
b4493b4640
@ -161,6 +161,20 @@ You can even backup individual files in the same repository.
|
||||
In fact several hosts may use the same repository to backup directories and
|
||||
files leading to a greater de-duplication.
|
||||
|
||||
You can exclude folders and files by specifying exclude-patterns.
|
||||
Either specify them with multiple `--exclude`'s or one `--exclude-file`
|
||||
|
||||
$ cat exclude
|
||||
# exclude go-files
|
||||
*.go
|
||||
# exclude foo/x/y/z/bar foo/x/bar foo/bar
|
||||
foo/**/bar
|
||||
$ restic -r /tmp/backup backup ~/work --exclude=*.c --exclude-file=exclude
|
||||
|
||||
Patterns use [`filepath.Glob`](https://golang.org/pkg/path/filepath/#Glob) internally,
|
||||
see [`filepath.Match`](https://golang.org/pkg/path/filepath/#Match) for syntax.
|
||||
Additionally `**` exludes arbitrary subdirectories.
|
||||
|
||||
# List all snapshots
|
||||
|
||||
Now, you can list all the snapshots stored in the repository:
|
||||
|
Loading…
Reference in New Issue
Block a user