upgrade.rst.inc 3.1 KB

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