borg-init.1 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. .\" Man page generated from reStructuredText.
  2. .
  3. .TH BORG-INIT 1 "2017-02-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 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.
  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. .sp
  85. \fIrepokey\fP and \fIkeyfile\fP use AES\-CTR\-256 for encryption and HMAC\-SHA256 for
  86. authentication in an encrypt\-then\-MAC (EtM) construction. The chunk ID hash
  87. is HMAC\-SHA256 as well (with a separate key).
  88. These modes are compatible with borg 1.0.x.
  89. .sp
  90. \fIrepokey\-blake2\fP and \fIkeyfile\-blake2\fP are also authenticated encryption modes,
  91. but use BLAKE2b\-256 instead of HMAC\-SHA256 for authentication. The chunk ID
  92. hash is a keyed BLAKE2b\-256 hash.
  93. These modes are new and \fInot\fP compatible with borg 1.0.x.
  94. .sp
  95. \fIauthenticated\fP mode uses no encryption, but authenticates repository contents
  96. through the same keyed BLAKE2b\-256 hash as the other blake2 modes (it uses it
  97. as chunk ID hash). The key is stored like repokey.
  98. This mode is new and not compatible with borg 1.0.x.
  99. .sp
  100. \fInone\fP mode uses no encryption and no authentication. It uses sha256 as chunk
  101. ID hash. Not recommended, rather consider using an authenticated or
  102. authenticated/encrypted mode.
  103. This mode is compatible with borg 1.0.x.
  104. .sp
  105. Hardware acceleration will be used automatically.
  106. .sp
  107. On modern Intel/AMD CPUs (except very cheap ones), AES is usually
  108. hardware\-accelerated. BLAKE2b is faster than SHA256 on Intel/AMD 64bit CPUs,
  109. which makes \fIauthenticated\fP faster than \fInone\fP\&.
  110. .sp
  111. On modern ARM CPUs, NEON provides hardware acceleration for SHA256 making it faster
  112. than BLAKE2b\-256 there.
  113. .SH OPTIONS
  114. .sp
  115. See \fIborg\-common(1)\fP for common options of Borg commands.
  116. .SS arguments
  117. .INDENT 0.0
  118. .TP
  119. .B REPOSITORY
  120. repository to create
  121. .UNINDENT
  122. .SS optional arguments
  123. .INDENT 0.0
  124. .TP
  125. .B \-e\fP,\fB \-\-encryption
  126. select encryption key mode
  127. .TP
  128. .B \-a\fP,\fB \-\-append\-only
  129. create an append\-only mode repository
  130. .UNINDENT
  131. .SH EXAMPLES
  132. .INDENT 0.0
  133. .INDENT 3.5
  134. .sp
  135. .nf
  136. .ft C
  137. # Local repository, repokey encryption, BLAKE2b (often faster, since Borg 1.1)
  138. $ borg init \-\-encryption=repokey\-blake2 /path/to/repo
  139. # Local repository (no encryption)
  140. $ borg init \-\-encryption=none /path/to/repo
  141. # Remote repository (accesses a remote borg via ssh)
  142. $ borg init \-\-encryption=repokey\-blake2 user@hostname:backup
  143. # Remote repository (store the key your home dir)
  144. $ borg init \-\-encryption=keyfile user@hostname:backup
  145. .ft P
  146. .fi
  147. .UNINDENT
  148. .UNINDENT
  149. .SH SEE ALSO
  150. .sp
  151. \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
  152. .SH AUTHOR
  153. The Borg Collective
  154. .\" Generated by docutils manpage writer.
  155. .