borg-serve.1 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. .\" Man page generated from reStructuredText.
  2. .
  3. .TH BORG-SERVE 1 "2017-04-29" "" "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. .sp
  57. It will then parse the original command that came from the client, makes sure
  58. that it is also \fBborg serve\fP and enforce path restriction(s) as given by the
  59. forced command. That way, other options given by the client (like \fB\-\-info\fP or
  60. \fB\-\-umask\fP) are preserved (and are not fixed by the forced command).
  61. .sp
  62. Environment variables (such as BORG_HOSTNAME_IS_UNIQUE) contained in the original
  63. command sent by the client are \fInot\fP interpreted, but ignored. If BORG_XXX environment
  64. variables should be set on the \fBborg serve\fP side, then these must be set in system\-specific
  65. locations like \fB/etc/environment\fP or in the forced command itself (example below).
  66. .INDENT 0.0
  67. .INDENT 3.5
  68. .sp
  69. .nf
  70. .ft C
  71. # Allow an SSH keypair to only run borg, and only have access to /path/to/repo.
  72. # Use key options to disable unneeded and potentially dangerous SSH functionality.
  73. # This will help to secure an automated remote backup system.
  74. $ cat ~/.ssh/authorized_keys
  75. 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[...]
  76. # Set a BORG_XXX environment variable on the "borg serve" side
  77. $ cat ~/.ssh/authorized_keys
  78. command="export BORG_XXX=value; borg serve [...]",restrict ssh\-rsa [...]
  79. .ft P
  80. .fi
  81. .UNINDENT
  82. .UNINDENT
  83. .SH SEE ALSO
  84. .sp
  85. \fIborg\-common(1)\fP
  86. .SH AUTHOR
  87. The Borg Collective
  88. .\" Generated by docutils manpage writer.
  89. .