upgrade.rst.inc 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  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. usage: borg upgrade [-h] [--critical] [--error] [--warning] [--info] [--debug]
  7. [--lock-wait N] [--show-rc] [--no-files-cache] [--umask M]
  8. [--remote-path PATH] [-p] [-n] [-i] [--force] [--tam]
  9. [--disable-tam]
  10. [REPOSITORY]
  11. upgrade a repository from a previous version
  12. positional arguments:
  13. REPOSITORY path to the repository to be upgraded
  14. optional arguments:
  15. -h, --help show this help message and exit
  16. --critical work on log level CRITICAL
  17. --error work on log level ERROR
  18. --warning work on log level WARNING (default)
  19. --info, -v, --verbose
  20. work on log level INFO
  21. --debug work on log level DEBUG
  22. --lock-wait N wait for the lock, but max. N seconds (default: 1).
  23. --show-rc show/log the return code (rc)
  24. --no-files-cache do not load/update the file metadata cache used to
  25. detect unchanged files
  26. --umask M set umask to M (local and remote, default: 0077)
  27. --remote-path PATH use PATH as borg executable on the remote (default:
  28. "borg")
  29. -p, --progress show progress display while upgrading the repository
  30. -n, --dry-run do not change repository
  31. -i, --inplace rewrite repository in place, with no chance of going
  32. back to older versions of the repository.
  33. --force Force upgrade
  34. --tam Enable manifest authentication (in key and cache)
  35. (Borg 1.0.9 and later)
  36. --disable-tam Disable manifest authentication (in key and cache)
  37. Description
  38. ~~~~~~~~~~~
  39. Upgrade an existing, local Borg repository.
  40. When you do not need borg upgrade
  41. +++++++++++++++++++++++++++++++++
  42. Not every change requires that you run ``borg upgrade``.
  43. You do **not** need to run it when:
  44. - moving your repository to a different place
  45. - upgrading to another point release (like 1.0.x to 1.0.y),
  46. except when noted otherwise in the changelog
  47. - upgrading from 1.0.x to 1.1.x,
  48. except when noted otherwise in the changelog
  49. Borg 1.x.y upgrades
  50. +++++++++++++++++++
  51. Use ``borg upgrade --tam REPO`` to require manifest authentication
  52. introduced with Borg 1.0.9 to address security issues. This means
  53. that modifying the repository after doing this with a version prior
  54. to 1.0.9 will raise a validation error, so only perform this upgrade
  55. after updating all clients using the repository to 1.0.9 or newer.
  56. This upgrade should be done on each client for safety reasons.
  57. If a repository is accidentally modified with a pre-1.0.9 client after
  58. this upgrade, use ``borg upgrade --tam --force REPO`` to remedy it.
  59. If you routinely do this you might not want to enable this upgrade
  60. (which will leave you exposed to the security issue). You can
  61. reverse the upgrade by issuing ``borg upgrade --disable-tam REPO``.
  62. See
  63. https://borgbackup.readthedocs.io/en/stable/changes.html#pre-1-0-9-manifest-spoofing-vulnerability
  64. for details.
  65. Attic and Borg 0.xx to Borg 1.x
  66. +++++++++++++++++++++++++++++++
  67. This currently supports converting an Attic repository to Borg and also
  68. helps with converting Borg 0.xx to 1.0.
  69. Currently, only LOCAL repositories can be upgraded (issue #465).
  70. Please note that ``borg create`` (since 1.0.0) uses bigger chunks by
  71. default than old borg or attic did, so the new chunks won't deduplicate
  72. with the old chunks in the upgraded repository.
  73. See ``--chunker-params`` option of ``borg create`` and ``borg recreate``.
  74. ``borg upgrade`` will change the magic strings in the repository's
  75. segments to match the new Borg magic strings. The keyfiles found in
  76. $ATTIC_KEYS_DIR or ~/.attic/keys/ will also be converted and
  77. copied to $BORG_KEYS_DIR or ~/.config/borg/keys.
  78. The cache files are converted, from $ATTIC_CACHE_DIR or
  79. ~/.cache/attic to $BORG_CACHE_DIR or ~/.cache/borg, but the
  80. cache layout between Borg and Attic changed, so it is possible
  81. the first backup after the conversion takes longer than expected
  82. due to the cache resync.
  83. Upgrade should be able to resume if interrupted, although it
  84. will still iterate over all segments. If you want to start
  85. from scratch, use `borg delete` over the copied repository to
  86. make sure the cache files are also removed:
  87. borg delete borg
  88. Unless ``--inplace`` is specified, the upgrade process first
  89. creates a backup copy of the repository, in
  90. REPOSITORY.upgrade-DATETIME, using hardlinks. This takes
  91. longer than in place upgrades, but is much safer and gives
  92. progress information (as opposed to ``cp -al``). Once you are
  93. satisfied with the conversion, you can safely destroy the
  94. backup copy.
  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.