From 0943f2235e66726e714df9407ddd1991ee144065 Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Tue, 24 Oct 2017 02:38:03 +0200 Subject: [PATCH] mention "!" (exclude-norecurse) type in patterns help (cherry picked from commit 36f2a4e1dcac69f58e5cfc8141a65b5006f32cf3) --- src/borg/archiver.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/borg/archiver.py b/src/borg/archiver.py index 2e7856b04..d978ec107 100644 --- a/src/borg/archiver.py +++ b/src/borg/archiver.py @@ -2026,10 +2026,12 @@ def do_break_lock(self, args, repository): may specify the backup roots (starting points) and patterns for inclusion/exclusion. A root path starts with the prefix `R`, followed by a path (a plain path, not a file pattern). An include rule starts with the prefix +, an exclude rule starts - with the prefix -, both followed by a pattern. + with the prefix -, an exclude-norecurse rule starts with !, all followed by a pattern. Inclusion patterns are useful to include paths that are contained in an excluded path. The first matching pattern is used so if an include pattern matches before - an exclude pattern, the file is backed up. + an exclude pattern, the file is backed up. If an exclude-norecurse pattern matches + a directory, it won't recurse into it and won't discover any potential matches for + include rules below that directory. Note that the default pattern style for ``--pattern`` and ``--patterns-from`` is shell style (`sh:`), so those patterns behave similar to rsync include/exclude