1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2025-01-01 12:45:34 +00:00

improve patterns help: added declarative includes sample

This commit is contained in:
eoli3n 2023-06-09 22:45:09 +02:00
parent ba922d2e0a
commit 095d5f463b

View file

@ -178,6 +178,25 @@ class HelpMixIn:
exclude stops examination of subdirectories so that potential includes
will not match - use normal excludes for such use cases.
Example::
# Define the recursion root
R /
# Exclude all iso files in any directory
- **/*.iso
# Explicitly include all inside etc and root
+ etc/**
+ root/**
# Exclude a specific directory under each user's home directories
- home/*/.cache
# Explicitly include everything in /home
+ home/**
# Explicitly exclude some directories without recursing into them
! re:^(dev|proc|run|sys|tmp)
# Exclude all other files and directories
# that are not specifically included earlier.
- **
**Tip: You can easily test your patterns with --dry-run and --list**::
$ borg create --dry-run --list --patterns-from patterns.txt archive