borg-serve.1 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. .\" Man page generated from reStructuredText.
  2. .
  3. .TH BORG-SERVE 1 "2017-02-11" "" "borg backup tool"
  4. .SH NAME
  5. borg-serve \- Start in server mode. This command is usually not used manually.
  6. .
  7. .nr rst2man-indent-level 0
  8. .
  9. .de1 rstReportMargin
  10. \\$1 \\n[an-margin]
  11. level \\n[rst2man-indent-level]
  12. level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
  13. -
  14. \\n[rst2man-indent0]
  15. \\n[rst2man-indent1]
  16. \\n[rst2man-indent2]
  17. ..
  18. .de1 INDENT
  19. .\" .rstReportMargin pre:
  20. . RS \\$1
  21. . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
  22. . nr rst2man-indent-level +1
  23. .\" .rstReportMargin post:
  24. ..
  25. .de UNINDENT
  26. . RE
  27. .\" indent \\n[an-margin]
  28. .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
  29. .nr rst2man-indent-level -1
  30. .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
  31. .in \\n[rst2man-indent\\n[rst2man-indent-level]]u
  32. ..
  33. .SH SYNOPSIS
  34. .sp
  35. borg serve <options>
  36. .SH DESCRIPTION
  37. .sp
  38. This command starts a repository server process. This command is usually not used manually.
  39. .SH OPTIONS
  40. .sp
  41. See \fIborg\-common(1)\fP for common options of Borg commands.
  42. .SS optional arguments
  43. .INDENT 0.0
  44. .TP
  45. .BI \-\-restrict\-to\-path \ PATH
  46. restrict repository access to PATH. Can be specified multiple times to allow the client access to several directories. Access to all sub\-directories is granted implicitly; PATH doesn\(aqt need to directly point to a repository.
  47. .TP
  48. .B \-\-append\-only
  49. only allow appending to repository segment files
  50. .UNINDENT
  51. .SH EXAMPLES
  52. .sp
  53. borg serve has special support for ssh forced commands (see \fBauthorized_keys\fP
  54. example below): it will detect that you use such a forced command and extract
  55. the value of the \fB\-\-restrict\-to\-path\fP option(s).
  56. It will then parse the original command that came from the client, makes sure
  57. that it is also \fBborg serve\fP and enforce path restriction(s) as given by the
  58. forced command. That way, other options given by the client (like \fB\-\-info\fP or
  59. \fB\-\-umask\fP) are preserved (and are not fixed by the forced command).
  60. .INDENT 0.0
  61. .INDENT 3.5
  62. .sp
  63. .nf
  64. .ft C
  65. # Allow an SSH keypair to only run borg, and only have access to /path/to/repo.
  66. # Use key options to disable unneeded and potentially dangerous SSH functionality.
  67. # This will help to secure an automated remote backup system.
  68. $ cat ~/.ssh/authorized_keys
  69. command="borg serve \-\-restrict\-to\-path /path/to/repo",no\-pty,no\-agent\-forwarding,no\-port\-forwarding,no\-X11\-forwarding,no\-user\-rc ssh\-rsa AAAAB3[...]
  70. .ft P
  71. .fi
  72. .UNINDENT
  73. .UNINDENT
  74. .SH SEE ALSO
  75. .sp
  76. \fIborg\-common(1)\fP
  77. .SH AUTHOR
  78. The Borg Collective
  79. .\" Generated by docutils manpage writer.
  80. .