Bladeren bron

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.
Thomas Waldmann 7 jaren geleden
bovenliggende
commit
f2a1539f25
3 gewijzigde bestanden met toevoegingen van 6 en 6 verwijderingen
  1. 2 2
      docs/faq.rst
  2. 1 1
      docs/usage/create.rst
  3. 3 3
      docs/usage/tar.rst

+ 2 - 2
docs/faq.rst

@@ -94,7 +94,7 @@ retransfer the data since the last checkpoint.
 
 If a backup was interrupted, you normally do not need to do anything special,
 just invoke ``borg create`` as you always do. If the repository is still locked,
-you may need to run ``borg break-lock`` before the next backup. You may use the 
+you may need to run ``borg break-lock`` before the next backup. You may use the
 same archive name as in previous attempt or a different one (e.g. if you always
 include the current datetime), it does not matter.
 
@@ -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::

+ 1 - 1
docs/usage/create.rst

@@ -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

+ 3 - 3
docs/usage/tar.rst

@@ -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"