From b4493b46409ca3ccda3c1a6dbf9d5202237016be Mon Sep 17 00:00:00 2001 From: Thor77 Date: Fri, 1 Apr 2016 15:56:52 +0200 Subject: [PATCH] add documentation for --exclude[-file] and patterns --- doc/Manual.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/doc/Manual.md b/doc/Manual.md index d02a2a5f8..98c172cbb 100644 --- a/doc/Manual.md +++ b/doc/Manual.md @@ -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: