upgrade.rst.inc 3.0 KB

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