Browse Source

add a push-style example to borg-create(1) (#4613)

add a push-style example to borg-create docs

When I browsed the readthedocs and manpages while setting up Borg for
myself for the first time, I saw multiple hints that pushing backups via
SSH is supported (e.g. the existence of the `borg serve` command and the
`--rsh` option), but I never found a clear example. I only found
<https://borgbackup.readthedocs.io/en/stable/usage/general.html#repository-urls>
after being pointed to it by @ThomasWaldmann.

Therefore, an explicit example in the `borg create` documentation seems
appropriate. I put it next to the pull-style example using sshfs which
serves a similar usecase.
Stefan Majewsky 5 năm trước cách đây
mục cha
commit
fc2c92b054
1 tập tin đã thay đổi với 4 bổ sung0 xóa
  1. 4 0
      docs/usage/create.rst

+ 4 - 0
docs/usage/create.rst

@@ -25,6 +25,10 @@ Examples
     # use zlib compression (good, but slow) - default is lz4 (fast, low compression ratio)
     $ borg create -C zlib,6 --one-file-system /path/to/repo::root-{now:%Y-%m-%d} /
 
+    # Backup onto a remote host ("push" style) via ssh to port 2222,
+    # logging in as user "borg" and storing into /path/to/repo
+    $ borg create ssh://borg@backup.example.org:2222/path/to/repo::{fqdn}-root-{now} /
+
     # Backup a remote host locally ("pull" style) using sshfs
     $ mkdir sshfs-mount
     $ sshfs root@example.com:/ sshfs-mount