upgrade.rst.inc 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. .. _borg_upgrade:
  2. borg upgrade
  3. ------------
  4. ::
  5. usage: borg upgrade [-h] [-v] [--show-rc] [--no-files-cache] [--umask M]
  6. [--remote-path PATH] [-n] [-i]
  7. [REPOSITORY]
  8. upgrade a repository from a previous version
  9. positional arguments:
  10. REPOSITORY path to the repository to be upgraded
  11. optional arguments:
  12. -h, --help show this help message and exit
  13. -v, --verbose verbose output
  14. --show-rc show/log the return code (rc)
  15. --no-files-cache do not load/update the file metadata cache used to
  16. detect unchanged files
  17. --umask M set umask to M (local and remote, default: 63)
  18. --remote-path PATH set remote path to executable (default: "borg")
  19. -n, --dry-run do not change repository
  20. -i, --inplace rewrite repository in place, with no chance of going
  21. back to older versions of the repository.
  22. Description
  23. ~~~~~~~~~~~
  24. upgrade an existing Borg repository. this currently
  25. only support converting an Attic repository, but may
  26. eventually be extended to cover major Borg upgrades as well.
  27. it will change the magic strings in the repository's segments
  28. to match the new Borg magic strings. the keyfiles found in
  29. $ATTIC_KEYS_DIR or ~/.attic/keys/ will also be converted and
  30. copied to $BORG_KEYS_DIR or ~/.borg/keys.
  31. the cache files are converted, from $ATTIC_CACHE_DIR or
  32. ~/.cache/attic to $BORG_CACHE_DIR or ~/.cache/borg, but the
  33. cache layout between Borg and Attic changed, so it is possible
  34. the first backup after the conversion takes longer than expected
  35. due to the cache resync.
  36. upgrade should be able to resume if interrupted, although it
  37. will still iterate over all segments. if you want to start
  38. from scratch, use `borg delete` over the copied repository to
  39. make sure the cache files are also removed:
  40. borg delete borg
  41. unless ``--inplace`` is specified, the upgrade process first
  42. creates a backup copy of the repository, in
  43. REPOSITORY.upgrade-DATETIME, using hardlinks. this takes
  44. longer than in place upgrades, but is much safer and gives
  45. progress information (as opposed to ``cp -al``). once you are
  46. satisfied with the conversion, you can safely destroy the
  47. backup copy.
  48. WARNING: running the upgrade in place will make the current
  49. copy unusable with older version, with no way of going back
  50. to previous versions. this can PERMANENTLY DAMAGE YOUR
  51. REPOSITORY! Attic CAN NOT READ BORG REPOSITORIES, as the
  52. magic strings have changed. you have been warned.