mirror of
https://github.com/borgbackup/borg.git
synced 2024-12-26 01:37:20 +00:00
docs: fix examples with problematic option placements, fixes #3356
have options to the left OR to the right of all positional arguments,
but not on BOTH sides and not in between them.
(cherry picked from commit f2a1539f25
)
This commit is contained in:
parent
26cfaf3681
commit
938d122191
3 changed files with 6 additions and 6 deletions
|
@ -265,7 +265,7 @@ Say you want to prune ``/var/log`` faster than the rest of
|
|||
archive *names* and then implement different prune policies for
|
||||
different prefixes. For example, you could have a script that does::
|
||||
|
||||
borg create $REPOSITORY:main-$(date +%Y-%m-%d) --exclude /var/log /
|
||||
borg create --exclude /var/log $REPOSITORY:main-$(date +%Y-%m-%d) /
|
||||
borg create $REPOSITORY:logs-$(date +%Y-%m-%d) /var/log
|
||||
|
||||
Then you would have two different prune calls with different policies::
|
||||
|
|
|
@ -23,7 +23,7 @@ Examples
|
|||
|
||||
# Backup the root filesystem into an archive named "root-YYYY-MM-DD"
|
||||
# use zlib compression (good, but slow) - default is lz4 (fast, low compression ratio)
|
||||
$ borg create -C zlib,6 /path/to/repo::root-{now:%Y-%m-%d} / --one-file-system
|
||||
$ borg create -C zlib,6 --one-file-system /path/to/repo::root-{now:%Y-%m-%d} /
|
||||
|
||||
# Backup a remote host locally ("pull" style) using sshfs
|
||||
$ mkdir sshfs-mount
|
||||
|
|
|
@ -11,11 +11,11 @@ Examples
|
|||
$ borg export-tar /path/to/repo::Monday Monday.tar.gz --exclude '*.so'
|
||||
|
||||
# use higher compression level with gzip
|
||||
$ borg export-tar testrepo::linux --tar-filter="gzip -9" Monday.tar.gz
|
||||
$ borg export-tar --tar-filter="gzip -9" testrepo::linux Monday.tar.gz
|
||||
|
||||
# export a gzipped tar, but instead of storing it on disk,
|
||||
# export a tar, but instead of storing it on disk,
|
||||
# upload it to a remote site using curl.
|
||||
$ borg export-tar ... --tar-filter="gzip" - | curl --data-binary @- https://somewhere/to/POST
|
||||
$ borg export-tar /path/to/repo::Monday - | curl --data-binary @- https://somewhere/to/POST
|
||||
|
||||
# remote extraction via "tarpipe"
|
||||
$ borg export-tar /path/to/repo::Monday - | ssh somewhere "cd extracted; tar x"
|
||||
|
|
Loading…
Reference in a new issue