upgrade.rst.inc 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. .. IMPORTANT: this file is auto-generated from borg's built-in help, do not edit!
  2. .. _borg_upgrade:
  3. borg upgrade
  4. ------------
  5. ::
  6. borg upgrade <options> REPOSITORY
  7. positional arguments
  8. REPOSITORY
  9. path to the repository to be upgraded
  10. optional arguments
  11. ``-p``, ``--progress``
  12. | show progress display while upgrading the repository
  13. ``-n``, ``--dry-run``
  14. | do not change repository
  15. ``-i``, ``--inplace``
  16. | rewrite repository in place, with no chance of going back to older
  17. | versions of the repository.
  18. ``--force``
  19. | Force upgrade
  20. ``--tam``
  21. | Enable manifest authentication (in key and cache) (Borg 1.0.9 and later)
  22. ``--disable-tam``
  23. | Disable manifest authentication (in key and cache)
  24. `Common options`_
  25. |
  26. Description
  27. ~~~~~~~~~~~
  28. Upgrade an existing Borg repository.
  29. Borg 1.x.y upgrades
  30. +++++++++++++++++++
  31. Use ``borg upgrade --tam REPO`` to require manifest authentication
  32. introduced with Borg 1.0.9 to address security issues. This means
  33. that modifying the repository after doing this with a version prior
  34. to 1.0.9 will raise a validation error, so only perform this upgrade
  35. after updating all clients using the repository to 1.0.9 or newer.
  36. This upgrade should be done on each client for safety reasons.
  37. If a repository is accidentally modified with a pre-1.0.9 client after
  38. this upgrade, use ``borg upgrade --tam --force REPO`` to remedy it.
  39. If you routinely do this you might not want to enable this upgrade
  40. (which will leave you exposed to the security issue). You can
  41. reverse the upgrade by issuing ``borg upgrade --disable-tam REPO``.
  42. See
  43. https://borgbackup.readthedocs.io/en/stable/changes.html#pre-1-0-9-manifest-spoofing-vulnerability
  44. for details.
  45. Attic and Borg 0.xx to Borg 1.x
  46. +++++++++++++++++++++++++++++++
  47. This currently supports converting an Attic repository to Borg and also
  48. helps with converting Borg 0.xx to 1.0.
  49. Currently, only LOCAL repositories can be upgraded (issue #465).
  50. It will change the magic strings in the repository's segments
  51. to match the new Borg magic strings. The keyfiles found in
  52. $ATTIC_KEYS_DIR or ~/.attic/keys/ will also be converted and
  53. copied to $BORG_KEYS_DIR or ~/.config/borg/keys.
  54. The cache files are converted, from $ATTIC_CACHE_DIR or
  55. ~/.cache/attic to $BORG_CACHE_DIR or ~/.cache/borg, but the
  56. cache layout between Borg and Attic changed, so it is possible
  57. the first backup after the conversion takes longer than expected
  58. due to the cache resync.
  59. Upgrade should be able to resume if interrupted, although it
  60. will still iterate over all segments. If you want to start
  61. from scratch, use `borg delete` over the copied repository to
  62. make sure the cache files are also removed:
  63. borg delete borg
  64. Unless ``--inplace`` is specified, the upgrade process first
  65. creates a backup copy of the repository, in
  66. REPOSITORY.upgrade-DATETIME, using hardlinks. This takes
  67. longer than in place upgrades, but is much safer and gives
  68. progress information (as opposed to ``cp -al``). Once you are
  69. satisfied with the conversion, you can safely destroy the
  70. backup copy.
  71. WARNING: Running the upgrade in place will make the current
  72. copy unusable with older version, with no way of going back
  73. to previous versions. This can PERMANENTLY DAMAGE YOUR
  74. REPOSITORY! Attic CAN NOT READ BORG REPOSITORIES, as the
  75. magic strings have changed. You have been warned.