From 6015ded828f2f0135f0a6c98c875741c674a40d4 Mon Sep 17 00:00:00 2001 From: Laurent Date: Wed, 16 Feb 2022 22:53:11 +0000 Subject: [PATCH] docs: explain the difference between a path that ends with or without a slash (#6297) docs: explain the difference between a path that ends with or without a slash --- src/borg/archiver.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/borg/archiver.py b/src/borg/archiver.py index 7a87702bf..a2b80a9a1 100644 --- a/src/borg/archiver.py +++ b/src/borg/archiver.py @@ -2234,6 +2234,11 @@ class Archiver: /path/to/repo /home/user`` will store all files as `home/user/.../file.ext`. + A directory exclusion pattern can end either with or without a slash ('/'). + If it ends with a slash, such as `some/path/`, the directory will be + included but not its content. If it does not end with a slash, such as + `some/path`, both the directory and content will be excluded. + File patterns support these styles: fnmatch, shell, regular expressions, path prefixes and path full-matches. By default, fnmatch is used for ``--exclude`` patterns and shell-style is used for the ``--pattern``