1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2025-02-22 14:11:27 +00:00

fix "patterns" help formatting, too

this way it renders nicely in html (via sphinx) and on console
This commit is contained in:
Thomas Waldmann 2016-06-22 08:44:14 +02:00
parent 5ae340998c
commit 12cb66b9f6

View file

@ -773,35 +773,35 @@ def do_break_lock(self, args, repository):
whitespace removal paths with whitespace at the beginning or end can only be whitespace removal paths with whitespace at the beginning or end can only be
excluded using regular expressions. excluded using regular expressions.
Examples: Examples::
# Exclude '/home/user/file.o' but not '/home/user/file.odt': # Exclude '/home/user/file.o' but not '/home/user/file.odt':
$ borg create -e '*.o' backup / $ borg create -e '*.o' backup /
# Exclude '/home/user/junk' and '/home/user/subdir/junk' but # Exclude '/home/user/junk' and '/home/user/subdir/junk' but
# not '/home/user/importantjunk' or '/etc/junk': # not '/home/user/importantjunk' or '/etc/junk':
$ borg create -e '/home/*/junk' backup / $ borg create -e '/home/*/junk' backup /
# Exclude the contents of '/home/user/cache' but not the directory itself: # Exclude the contents of '/home/user/cache' but not the directory itself:
$ borg create -e /home/user/cache/ backup / $ borg create -e /home/user/cache/ backup /
# The file '/home/user/cache/important' is *not* backed up: # The file '/home/user/cache/important' is *not* backed up:
$ borg create -e /home/user/cache/ backup / /home/user/cache/important $ borg create -e /home/user/cache/ backup / /home/user/cache/important
# The contents of directories in '/home' are not backed up when their name # The contents of directories in '/home' are not backed up when their name
# ends in '.tmp' # ends in '.tmp'
$ borg create --exclude 're:^/home/[^/]+\.tmp/' backup / $ borg create --exclude 're:^/home/[^/]+\.tmp/' backup /
# Load exclusions from file # Load exclusions from file
$ cat >exclude.txt <<EOF $ cat >exclude.txt <<EOF
# Comment line # Comment line
/home/*/junk /home/*/junk
*.tmp *.tmp
fm:aa:something/* fm:aa:something/*
re:^/home/[^/]\.tmp/ re:^/home/[^/]\.tmp/
sh:/home/*/.thumbnails sh:/home/*/.thumbnails
EOF EOF
$ borg create --exclude-from exclude.txt backup / $ borg create --exclude-from exclude.txt backup /
''') ''')
helptext['placeholders'] = textwrap.dedent(''' helptext['placeholders'] = textwrap.dedent('''
Repository (or Archive) URLs and --prefix values support these placeholders: Repository (or Archive) URLs and --prefix values support these placeholders: