upgrade.rst.inc 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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. `Common options`_
  19. |
  20. Description
  21. ~~~~~~~~~~~
  22. Upgrade an existing Borg repository.
  23. This currently supports converting an Attic repository to Borg and also
  24. helps with converting Borg 0.xx to 1.0.
  25. Currently, only LOCAL repositories can be upgraded (issue #465).
  26. It will change the magic strings in the repository's segments
  27. to match the new Borg magic strings. The keyfiles found in
  28. $ATTIC_KEYS_DIR or ~/.attic/keys/ will also be converted and
  29. copied to $BORG_KEYS_DIR or ~/.config/borg/keys.
  30. The cache files are converted, from $ATTIC_CACHE_DIR or
  31. ~/.cache/attic to $BORG_CACHE_DIR or ~/.cache/borg, but the
  32. cache layout between Borg and Attic changed, so it is possible
  33. the first backup after the conversion takes longer than expected
  34. due to the cache resync.
  35. Upgrade should be able to resume if interrupted, although it
  36. will still iterate over all segments. If you want to start
  37. from scratch, use `borg delete` over the copied repository to
  38. make sure the cache files are also removed:
  39. borg delete borg
  40. Unless ``--inplace`` is specified, the upgrade process first
  41. creates a backup copy of the repository, in
  42. REPOSITORY.upgrade-DATETIME, using hardlinks. This takes
  43. longer than in place upgrades, but is much safer and gives
  44. progress information (as opposed to ``cp -al``). Once you are
  45. satisfied with the conversion, you can safely destroy the
  46. backup copy.
  47. WARNING: Running the upgrade in place will make the current
  48. copy unusable with older version, with no way of going back
  49. to previous versions. This can PERMANENTLY DAMAGE YOUR
  50. REPOSITORY! Attic CAN NOT READ BORG REPOSITORIES, as the
  51. magic strings have changed. You have been warned.