mirror of
https://github.com/borgbackup/borg.git
synced 2025-02-22 14:11:27 +00:00
Documentation for 'attic serve'
Thanks to @lfam (attic PR #277 )! Note: As I already had refactored a lot of these pathes you changed, it was easier to just cherry pick the hunks with the other changes and apply them manually.
This commit is contained in:
parent
4ce754178c
commit
7cbff6925f
3 changed files with 25 additions and 5 deletions
|
@ -138,17 +138,25 @@ Remote repositories
|
|||
host is accessible using SSH. This is fastest and easiest when |project_name|
|
||||
is installed on the remote host, in which case the following syntax is used::
|
||||
|
||||
$ borg init user@hostname:backup
|
||||
$ borg init user@hostname:/mnt/backup
|
||||
|
||||
or::
|
||||
|
||||
$ borg init ssh://user@hostname:port/backup
|
||||
$ borg init ssh://user@hostname:port//mnt/backup
|
||||
|
||||
If it is not possible to install |project_name| on the remote host,
|
||||
Remote operations over SSH can be automated with SSH keys. You can restrict the
|
||||
use of the SSH keypair by prepending a forced command to the SSH public key in
|
||||
the remote server's authorized_keys file. Only the forced command will be run
|
||||
when the key authenticates a connection. This example will start attic in server
|
||||
mode, and limit the attic server to a specific filesystem path::
|
||||
|
||||
command="attic serve --restrict-to-path /mnt/backup" ssh-rsa AAAAB3[...]
|
||||
|
||||
If it is not possible to install |project_name| on the remote host,
|
||||
it is still possible to use the remote host to store a repository by
|
||||
mounting the remote filesystem, for example, using sshfs::
|
||||
|
||||
$ sshfs user@hostname:/path/to/folder /mnt
|
||||
$ sshfs user@hostname:/mnt /mnt
|
||||
$ borg init /mnt/backup
|
||||
$ fusermount -u /mnt
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
if [ ! -d usage ]; then
|
||||
mkdir usage
|
||||
fi
|
||||
for cmd in change-passphrase check create delete extract info init list mount prune; do
|
||||
for cmd in change-passphrase check create delete extract info init list mount prune serve; do
|
||||
FILENAME="usage/$cmd.rst.inc"
|
||||
LINE=`echo -n borg $cmd | tr 'a-z- ' '-'`
|
||||
echo -e ".. _borg_$cmd:\n" > $FILENAME
|
||||
|
|
|
@ -168,3 +168,15 @@ Examples
|
|||
Enter same passphrase again:
|
||||
Key file "/home/USER/.borg/keys/mnt_backup" updated
|
||||
|
||||
|
||||
.. include:: usage/serve.rst.inc
|
||||
|
||||
Examples
|
||||
~~~~~~~~
|
||||
::
|
||||
|
||||
# Allow an SSH keypair to only run attic, and only have access to /mnt/backup.
|
||||
# This will help to secure an automated remote backup system.
|
||||
$ cat ~/.ssh/authorized_keys
|
||||
command="attic serve --restrict-to-path /mnt/backup" ssh-rsa AAAAB3[...]
|
||||
|
||||
|
|
Loading…
Reference in a new issue