borg-upgrade.1 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. .\" Man page generated from reStructuredText.
  2. .
  3. .TH BORG-UPGRADE 1 "2017-02-11" "" "borg backup tool"
  4. .SH NAME
  5. borg-upgrade \- upgrade a repository from a previous version
  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 upgrade <options> REPOSITORY
  36. .SH DESCRIPTION
  37. .sp
  38. Upgrade an existing Borg repository.
  39. .SS Borg 1.x.y upgrades
  40. .sp
  41. Use \fBborg upgrade \-\-tam REPO\fP to require manifest authentication
  42. introduced with Borg 1.0.9 to address security issues. This means
  43. that modifying the repository after doing this with a version prior
  44. to 1.0.9 will raise a validation error, so only perform this upgrade
  45. after updating all clients using the repository to 1.0.9 or newer.
  46. .sp
  47. This upgrade should be done on each client for safety reasons.
  48. .sp
  49. If a repository is accidentally modified with a pre\-1.0.9 client after
  50. this upgrade, use \fBborg upgrade \-\-tam \-\-force REPO\fP to remedy it.
  51. .sp
  52. If you routinely do this you might not want to enable this upgrade
  53. (which will leave you exposed to the security issue). You can
  54. reverse the upgrade by issuing \fBborg upgrade \-\-disable\-tam REPO\fP\&.
  55. .sp
  56. See
  57. \fI\%https://borgbackup.readthedocs.io/en/stable/changes.html#pre\-1\-0\-9\-manifest\-spoofing\-vulnerability\fP
  58. for details.
  59. .SS Attic and Borg 0.xx to Borg 1.x
  60. .sp
  61. This currently supports converting an Attic repository to Borg and also
  62. helps with converting Borg 0.xx to 1.0.
  63. .sp
  64. Currently, only LOCAL repositories can be upgraded (issue #465).
  65. .sp
  66. It will change the magic strings in the repository\(aqs segments
  67. to match the new Borg magic strings. The keyfiles found in
  68. $ATTIC_KEYS_DIR or ~/.attic/keys/ will also be converted and
  69. copied to $BORG_KEYS_DIR or ~/.config/borg/keys.
  70. .sp
  71. The cache files are converted, from $ATTIC_CACHE_DIR or
  72. ~/.cache/attic to $BORG_CACHE_DIR or ~/.cache/borg, but the
  73. cache layout between Borg and Attic changed, so it is possible
  74. the first backup after the conversion takes longer than expected
  75. due to the cache resync.
  76. .sp
  77. Upgrade should be able to resume if interrupted, although it
  78. will still iterate over all segments. If you want to start
  79. from scratch, use \fIborg delete\fP over the copied repository to
  80. make sure the cache files are also removed:
  81. .INDENT 0.0
  82. .INDENT 3.5
  83. borg delete borg
  84. .UNINDENT
  85. .UNINDENT
  86. .sp
  87. Unless \fB\-\-inplace\fP is specified, the upgrade process first
  88. creates a backup copy of the repository, in
  89. REPOSITORY.upgrade\-DATETIME, using hardlinks. This takes
  90. longer than in place upgrades, but is much safer and gives
  91. progress information (as opposed to \fBcp \-al\fP). Once you are
  92. satisfied with the conversion, you can safely destroy the
  93. backup copy.
  94. .sp
  95. WARNING: Running the upgrade in place will make the current
  96. copy unusable with older version, with no way of going back
  97. to previous versions. This can PERMANENTLY DAMAGE YOUR
  98. REPOSITORY! Attic CAN NOT READ BORG REPOSITORIES, as the
  99. magic strings have changed. You have been warned.
  100. .SH OPTIONS
  101. .sp
  102. See \fIborg\-common(1)\fP for common options of Borg commands.
  103. .SS arguments
  104. .INDENT 0.0
  105. .TP
  106. .B REPOSITORY
  107. path to the repository to be upgraded
  108. .UNINDENT
  109. .SS optional arguments
  110. .INDENT 0.0
  111. .TP
  112. .B \-p\fP,\fB \-\-progress
  113. show progress display while upgrading the repository
  114. .TP
  115. .B \-n\fP,\fB \-\-dry\-run
  116. do not change repository
  117. .TP
  118. .B \-i\fP,\fB \-\-inplace
  119. rewrite repository in place, with no chance of going back to older
  120. versions of the repository.
  121. .TP
  122. .B \-\-force
  123. Force upgrade
  124. .TP
  125. .B \-\-tam
  126. Enable manifest authentication (in key and cache) (Borg 1.0.9 and later)
  127. .TP
  128. .B \-\-disable\-tam
  129. Disable manifest authentication (in key and cache)
  130. .UNINDENT
  131. .SH EXAMPLES
  132. .INDENT 0.0
  133. .INDENT 3.5
  134. .sp
  135. .nf
  136. .ft C
  137. # Upgrade the borg repository to the most recent version.
  138. $ borg upgrade \-v /path/to/repo
  139. making a hardlink copy in /path/to/repo.upgrade\-2016\-02\-15\-20:51:55
  140. opening attic repository with borg and converting
  141. no key file found for repository
  142. converting repo index /path/to/repo/index.0
  143. converting 1 segments...
  144. converting borg 0.xx to borg current
  145. no key file found for repository
  146. .ft P
  147. .fi
  148. .UNINDENT
  149. .UNINDENT
  150. .SS Upgrading a passphrase encrypted attic repo
  151. .sp
  152. attic offered a "passphrase" encryption mode, but this was removed in borg 1.0
  153. and replaced by the "repokey" mode (which stores the passphrase\-protected
  154. encryption key into the repository config).
  155. .sp
  156. Thus, to upgrade a "passphrase" attic repo to a "repokey" borg repo, 2 steps
  157. are needed, in this order:
  158. .INDENT 0.0
  159. .IP \(bu 2
  160. borg upgrade repo
  161. .IP \(bu 2
  162. borg key migrate\-to\-repokey repo
  163. .UNINDENT
  164. .SH SEE ALSO
  165. .sp
  166. \fIborg\-common(1)\fP
  167. .SH AUTHOR
  168. The Borg Collective
  169. .\" Generated by docutils manpage writer.
  170. .