Jelajahi Sumber

mention "!" (exclude-norecurse) type in patterns help

Thomas Waldmann 7 tahun lalu
induk
melakukan
36f2a4e1dc
1 mengubah file dengan 4 tambahan dan 2 penghapusan
  1. 4 2
      src/borg/archiver.py

+ 4 - 2
src/borg/archiver.py

@@ -1830,10 +1830,12 @@ class Archiver:
             may specify the backup roots (starting points) and patterns for inclusion/exclusion.
             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
             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
             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
             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
             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
             Note that the default pattern style for ``--pattern`` and ``--patterns-from`` is
             shell style (`sh:`), so those patterns behave similar to rsync include/exclude
             shell style (`sh:`), so those patterns behave similar to rsync include/exclude