borg-init.1 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208
  1. .\" Man page generated from reStructuredText.
  2. .
  3. .TH BORG-INIT 1 "2017-06-11" "" "borg backup tool"
  4. .SH NAME
  5. borg-init \- Initialize an empty repository
  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 [common options] init <options> REPOSITORY
  36. .SH DESCRIPTION
  37. .sp
  38. This command initializes an empty repository. A repository is a filesystem
  39. directory containing the deduplicated data from zero or more archives.
  40. .sp
  41. Encryption can be enabled at repository init time. It cannot be changed later.
  42. .sp
  43. It is not recommended to work without encryption. Repository encryption protects
  44. you e.g. against the case that an attacker has access to your backup repository.
  45. .sp
  46. But be careful with the key / the passphrase:
  47. .sp
  48. If you want "passphrase\-only" security, use one of the repokey modes. The
  49. key will be stored inside the repository (in its "config" file). In above
  50. mentioned attack scenario, the attacker will have the key (but not the
  51. passphrase).
  52. .sp
  53. If you want "passphrase and having\-the\-key" security, use one of the keyfile
  54. modes. The key will be stored in your home directory (in .config/borg/keys).
  55. In the attack scenario, the attacker who has just access to your repo won\(aqt
  56. have the key (and also not the passphrase).
  57. .sp
  58. Make a backup copy of the key file (keyfile mode) or repo config file
  59. (repokey mode) and keep it at a safe place, so you still have the key in
  60. case it gets corrupted or lost. Also keep the passphrase at a safe place.
  61. The backup that is encrypted with that key won\(aqt help you with that, of course.
  62. .sp
  63. Make sure you use a good passphrase. Not too short, not too simple. The real
  64. encryption / decryption key is encrypted with / locked by your passphrase.
  65. If an attacker gets your key, he can\(aqt unlock and use it without knowing the
  66. passphrase.
  67. .sp
  68. Be careful with special or non\-ascii characters in your passphrase:
  69. .INDENT 0.0
  70. .IP \(bu 2
  71. Borg processes the passphrase as unicode (and encodes it as utf\-8),
  72. so it does not have problems dealing with even the strangest characters.
  73. .IP \(bu 2
  74. BUT: that does not necessarily apply to your OS / VM / keyboard configuration.
  75. .UNINDENT
  76. .sp
  77. So better use a long passphrase made from simple ascii chars than one that
  78. includes non\-ascii stuff or characters that are hard/impossible to enter on
  79. a different keyboard layout.
  80. .sp
  81. You can change your passphrase for existing repos at any time, it won\(aqt affect
  82. the encryption/decryption key or other secrets.
  83. .SS Encryption modes
  84. .TS
  85. center;
  86. |l|l|l|l|.
  87. _
  88. T{
  89. Hash/MAC
  90. T} T{
  91. Not encrypted
  92. no auth
  93. T} T{
  94. Not encrypted,
  95. but authenticated
  96. T} T{
  97. Encrypted (AEAD w/ AES)
  98. and authenticated
  99. T}
  100. _
  101. T{
  102. SHA\-256
  103. T} T{
  104. none
  105. T} T{
  106. authenticated
  107. T} T{
  108. repokey, keyfile
  109. T}
  110. _
  111. T{
  112. BLAKE2b
  113. T} T{
  114. n/a
  115. T} T{
  116. authenticated\-blake2
  117. T} T{
  118. repokey\-blake2,
  119. keyfile\-blake2
  120. T}
  121. _
  122. .TE
  123. .sp
  124. On modern Intel/AMD CPUs (except very cheap ones), AES is usually
  125. hardware\-accelerated.
  126. BLAKE2b is faster than SHA256 on Intel/AMD 64\-bit CPUs,
  127. which makes \fIauthenticated\-blake2\fP faster than \fInone\fP and \fIauthenticated\fP\&.
  128. .sp
  129. On modern ARM CPUs, NEON provides hardware acceleration for SHA256 making it faster
  130. than BLAKE2b\-256 there. NEON accelerates AES as well.
  131. .sp
  132. Hardware acceleration is always used automatically when available.
  133. .sp
  134. \fIrepokey\fP and \fIkeyfile\fP use AES\-CTR\-256 for encryption and HMAC\-SHA256 for
  135. authentication in an encrypt\-then\-MAC (EtM) construction. The chunk ID hash
  136. is HMAC\-SHA256 as well (with a separate key).
  137. These modes are compatible with borg 1.0.x.
  138. .sp
  139. \fIrepokey\-blake2\fP and \fIkeyfile\-blake2\fP are also authenticated encryption modes,
  140. but use BLAKE2b\-256 instead of HMAC\-SHA256 for authentication. The chunk ID
  141. hash is a keyed BLAKE2b\-256 hash.
  142. These modes are new and \fInot\fP compatible with Borg 1.0.x.
  143. .sp
  144. \fIauthenticated\fP mode uses no encryption, but authenticates repository contents
  145. through the same HMAC\-SHA256 hash as the \fIrepokey\fP and \fIkeyfile\fP modes (it uses it
  146. as the chunk ID hash). The key is stored like \fIrepokey\fP\&.
  147. This mode is new and \fInot\fP compatible with borg 1.0.x.
  148. .sp
  149. \fIauthenticated\-blake2\fP is like \fIauthenticated\fP, but uses the keyed BLAKE2b\-256 hash
  150. from the other blake2 modes.
  151. This mode is new and \fInot\fP compatible with Borg 1.0.x.
  152. .sp
  153. \fInone\fP mode uses no encryption and no authentication. It uses SHA256 as chunk
  154. ID hash. Not recommended, rather consider using an authenticated or
  155. authenticated/encrypted mode.
  156. Use it only for new repositories where no encryption is wanted \fBand\fP when compatibility
  157. with 1.0.x is important. If compatibility with 1.0.x is not important, use
  158. \fIauthenticated\-blake2\fP or \fIauthenticated\fP instead.
  159. This mode is compatible with Borg 1.0.x.
  160. .SH OPTIONS
  161. .sp
  162. See \fIborg\-common(1)\fP for common options of Borg commands.
  163. .SS arguments
  164. .INDENT 0.0
  165. .TP
  166. .B REPOSITORY
  167. repository to create
  168. .UNINDENT
  169. .SS optional arguments
  170. .INDENT 0.0
  171. .TP
  172. .B \-e\fP,\fB \-\-encryption
  173. select encryption key mode \fB(required)\fP
  174. .TP
  175. .B \-a\fP,\fB \-\-append\-only
  176. create an append\-only mode repository
  177. .TP
  178. .B \-\-storage\-quota
  179. Set storage quota of the new repository (e.g. 5G, 1.5T). Default: no quota.
  180. .UNINDENT
  181. .SH EXAMPLES
  182. .INDENT 0.0
  183. .INDENT 3.5
  184. .sp
  185. .nf
  186. .ft C
  187. # Local repository, repokey encryption, BLAKE2b (often faster, since Borg 1.1)
  188. $ borg init \-\-encryption=repokey\-blake2 /path/to/repo
  189. # Local repository (no encryption)
  190. $ borg init \-\-encryption=none /path/to/repo
  191. # Remote repository (accesses a remote borg via ssh)
  192. $ borg init \-\-encryption=repokey\-blake2 user@hostname:backup
  193. # Remote repository (store the key your home dir)
  194. $ borg init \-\-encryption=keyfile user@hostname:backup
  195. .ft P
  196. .fi
  197. .UNINDENT
  198. .UNINDENT
  199. .SH SEE ALSO
  200. .sp
  201. \fIborg\-common(1)\fP, \fIborg\-create(1)\fP, \fIborg\-delete(1)\fP, \fIborg\-check(1)\fP, \fIborg\-list(1)\fP, \fIborg\-key\-import(1)\fP, \fIborg\-key\-export(1)\fP, \fIborg\-key\-change\-passphrase(1)\fP
  202. .SH AUTHOR
  203. The Borg Collective
  204. .\" Generated by docutils manpage writer.
  205. .