mirror of
https://github.com/borgbackup/borg.git
synced 2024-12-25 09:19:31 +00:00
8e36075fe9
the generation of those files was causing us way too much pain to justify automatically generating them all the time. those will have to be re-generated with `build_api` or `build_usage` as appropriate, for example when function signatures or commandline flags change. see #384
34 lines
No EOL
1.5 KiB
C++
34 lines
No EOL
1.5 KiB
C++
.. _borg_patterns:
|
|
|
|
borg help patterns
|
|
~~~~~~~~~~~~~~~~~~
|
|
::
|
|
|
|
|
|
Exclude patterns use a variant of shell pattern syntax, with '*' matching any
|
|
number of characters, '?' matching any single character, '[...]' matching any
|
|
single character specified, including ranges, and '[!...]' matching any
|
|
character not specified. For the purpose of these patterns, the path
|
|
separator ('\' for Windows and '/' on other systems) is not treated
|
|
specially. For a path to match a pattern, it must completely match from
|
|
start to end, or must match from the start to just before a path separator.
|
|
Except for the root path, paths will never end in the path separator when
|
|
matching is attempted. Thus, if a given pattern ends in a path separator, a
|
|
'*' is appended before matching is attempted. Patterns with wildcards should
|
|
be quoted to protect them from shell expansion.
|
|
|
|
Examples:
|
|
|
|
# Exclude '/home/user/file.o' but not '/home/user/file.odt':
|
|
$ borg create -e '*.o' backup /
|
|
|
|
# Exclude '/home/user/junk' and '/home/user/subdir/junk' but
|
|
# not '/home/user/importantjunk' or '/etc/junk':
|
|
$ borg create -e '/home/*/junk' backup /
|
|
|
|
# Exclude the contents of '/home/user/cache' but not the directory itself:
|
|
$ borg create -e /home/user/cache/ backup /
|
|
|
|
# The file '/home/user/cache/important' is *not* backed up:
|
|
$ borg create -e /home/user/cache/ backup / /home/user/cache/important
|
|
|