2
0

upgrade.rst.inc 2.1 KB

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