upgrade.rst.inc 3.2 KB

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