Skip to content

Commit

Permalink
[DOC] #4118 - Explain difference between --exclude and --pattern. (#4783
Browse files Browse the repository at this point in the history
)

docs: Explain difference between --exclude and --pattern, fixes #4118
  • Loading branch information
fantasya-pbem authored and ThomasWaldmann committed Oct 19, 2019
1 parent f07bcb1 commit 212b438
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/borg/archiver.py
Original file line number Diff line number Diff line change
Expand Up @@ -2155,6 +2155,13 @@ def do_break_lock(self, args, repository):
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 -, an exclude-norecurse rule starts with !, all followed by a pattern.
.. note::
Via ``--pattern`` or ``--patterns-from`` you can define BOTH inclusion and exclusion
of files using pattern prefixes ``+`` and ``-``. With ``--exclude`` and
``--exlude-from`` ONLY excludes are defined.
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. If an exclude-norecurse pattern matches
Expand Down

0 comments on commit 212b438

Please sign in to comment.