upgrade.rst.inc 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. .. IMPORTANT: this file is auto-generated from borg's built-in help, do not edit!
  2. .. _borg_upgrade:
  3. borg upgrade
  4. ------------
  5. .. code-block:: none
  6. borg [common options] upgrade [options] REPOSITORY
  7. .. only:: html
  8. .. class:: borg-options-table
  9. +-------------------------------------------------------+-----------------------+-------------------------------------------------------------------------------------------------------------------------------+
  10. | **positional arguments** |
  11. +-------------------------------------------------------+-----------------------+-------------------------------------------------------------------------------------------------------------------------------+
  12. | | ``REPOSITORY`` | path to the repository to be upgraded |
  13. +-------------------------------------------------------+-----------------------+-------------------------------------------------------------------------------------------------------------------------------+
  14. | **optional arguments** |
  15. +-------------------------------------------------------+-----------------------+-------------------------------------------------------------------------------------------------------------------------------+
  16. | | ``-n``, ``--dry-run`` | do not change repository |
  17. +-------------------------------------------------------+-----------------------+-------------------------------------------------------------------------------------------------------------------------------+
  18. | | ``--inplace`` | rewrite repository in place, with no chance of going back to older |
  19. | | | versions of the repository. |
  20. +-------------------------------------------------------+-----------------------+-------------------------------------------------------------------------------------------------------------------------------+
  21. | | ``--force`` | Force upgrade |
  22. +-------------------------------------------------------+-----------------------+-------------------------------------------------------------------------------------------------------------------------------+
  23. | | ``--tam`` | Enable manifest authentication (in key and cache) (Borg 1.0.9 and later) |
  24. +-------------------------------------------------------+-----------------------+-------------------------------------------------------------------------------------------------------------------------------+
  25. | | ``--disable-tam`` | Disable manifest authentication (in key and cache) |
  26. +-------------------------------------------------------+-----------------------+-------------------------------------------------------------------------------------------------------------------------------+
  27. | .. class:: borg-common-opt-ref |
  28. | |
  29. | :ref:`common_options` |
  30. +-------------------------------------------------------+-----------------------+-------------------------------------------------------------------------------------------------------------------------------+
  31. .. raw:: html
  32. <script type='text/javascript'>
  33. $(document).ready(function () {
  34. $('.borg-options-table colgroup').remove();
  35. })
  36. </script>
  37. .. only:: latex
  38. REPOSITORY
  39. path to the repository to be upgraded
  40. optional arguments
  41. -n, --dry-run do not change repository
  42. --inplace rewrite repository in place, with no chance of going back to older
  43. versions of the repository.
  44. --force Force upgrade
  45. --tam Enable manifest authentication (in key and cache) (Borg 1.0.9 and later)
  46. --disable-tam Disable manifest authentication (in key and cache)
  47. :ref:`common_options`
  48. |
  49. Description
  50. ~~~~~~~~~~~
  51. Upgrade an existing, local Borg repository.
  52. When you do not need borg upgrade
  53. +++++++++++++++++++++++++++++++++
  54. Not every change requires that you run ``borg upgrade``.
  55. You do **not** need to run it when:
  56. - moving your repository to a different place
  57. - upgrading to another point release (like 1.0.x to 1.0.y),
  58. except when noted otherwise in the changelog
  59. - upgrading from 1.0.x to 1.1.x,
  60. except when noted otherwise in the changelog
  61. Borg 1.x.y upgrades
  62. +++++++++++++++++++
  63. Use ``borg upgrade --tam REPO`` to require manifest authentication
  64. introduced with Borg 1.0.9 to address security issues. This means
  65. that modifying the repository after doing this with a version prior
  66. to 1.0.9 will raise a validation error, so only perform this upgrade
  67. after updating all clients using the repository to 1.0.9 or newer.
  68. This upgrade should be done on each client for safety reasons.
  69. If a repository is accidentally modified with a pre-1.0.9 client after
  70. this upgrade, use ``borg upgrade --tam --force REPO`` to remedy it.
  71. If you routinely do this you might not want to enable this upgrade
  72. (which will leave you exposed to the security issue). You can
  73. reverse the upgrade by issuing ``borg upgrade --disable-tam REPO``.
  74. See
  75. https://borgbackup.readthedocs.io/en/stable/changes.html#pre-1-0-9-manifest-spoofing-vulnerability
  76. for details.
  77. Attic and Borg 0.xx to Borg 1.x
  78. +++++++++++++++++++++++++++++++
  79. This currently supports converting an Attic repository to Borg and also
  80. helps with converting Borg 0.xx to 1.0.
  81. Currently, only LOCAL repositories can be upgraded (issue #465).
  82. Please note that ``borg create`` (since 1.0.0) uses bigger chunks by
  83. default than old borg or attic did, so the new chunks won't deduplicate
  84. with the old chunks in the upgraded repository.
  85. See ``--chunker-params`` option of ``borg create`` and ``borg recreate``.
  86. ``borg upgrade`` will change the magic strings in the repository's
  87. segments to match the new Borg magic strings. The keyfiles found in
  88. $ATTIC_KEYS_DIR or ~/.attic/keys/ will also be converted and
  89. copied to $BORG_KEYS_DIR or ~/.config/borg/keys.
  90. The cache files are converted, from $ATTIC_CACHE_DIR or
  91. ~/.cache/attic to $BORG_CACHE_DIR or ~/.cache/borg, but the
  92. cache layout between Borg and Attic changed, so it is possible
  93. the first backup after the conversion takes longer than expected
  94. due to the cache resync.
  95. Upgrade should be able to resume if interrupted, although it
  96. will still iterate over all segments. If you want to start
  97. from scratch, use `borg delete` over the copied repository to
  98. make sure the cache files are also removed:
  99. borg delete borg
  100. Unless ``--inplace`` is specified, the upgrade process first
  101. creates a backup copy of the repository, in
  102. REPOSITORY.before-upgrade-DATETIME, using hardlinks. This takes
  103. longer than in place upgrades, but is much safer and gives
  104. progress information (as opposed to ``cp -al``). Once you are
  105. satisfied with the conversion, you can safely destroy the
  106. backup copy.
  107. WARNING: Running the upgrade in place will make the current
  108. copy unusable with older version, with no way of going back
  109. to previous versions. This can PERMANENTLY DAMAGE YOUR
  110. REPOSITORY! Attic CAN NOT READ BORG REPOSITORIES, as the
  111. magic strings have changed. You have been warned.