upgrade.rst.inc 2.9 KB

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