upgrade.rst.inc 2.9 KB

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