upgrade.rst.inc 3.1 KB

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