transfer.rst.inc 7.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. .. IMPORTANT: this file is auto-generated from borg's built-in help, do not edit!
  2. .. _borg_transfer:
  3. borg transfer
  4. -------------
  5. .. code-block:: none
  6. borg [common options] transfer [options]
  7. .. only:: html
  8. .. class:: borg-options-table
  9. +-----------------------------------------------------------------------------+----------------------------------------------+--------------------------------------------------------------------------------------------------+
  10. | **options** |
  11. +-----------------------------------------------------------------------------+----------------------------------------------+--------------------------------------------------------------------------------------------------+
  12. | | ``-n``, ``--dry-run`` | do not change repository, just check |
  13. +-----------------------------------------------------------------------------+----------------------------------------------+--------------------------------------------------------------------------------------------------+
  14. | | ``--other-repo SRC_REPOSITORY`` | transfer archives from the other repository |
  15. +-----------------------------------------------------------------------------+----------------------------------------------+--------------------------------------------------------------------------------------------------+
  16. | | ``--upgrader UPGRADER`` | use the upgrader to convert transferred data (default: no conversion) |
  17. +-----------------------------------------------------------------------------+----------------------------------------------+--------------------------------------------------------------------------------------------------+
  18. | .. class:: borg-common-opt-ref |
  19. | |
  20. | :ref:`common_options` |
  21. +-----------------------------------------------------------------------------+----------------------------------------------+--------------------------------------------------------------------------------------------------+
  22. | **Archive filters** — Archive filters can be applied to repository targets. |
  23. +-----------------------------------------------------------------------------+----------------------------------------------+--------------------------------------------------------------------------------------------------+
  24. | | ``-a PATTERN``, ``--match-archives PATTERN`` | only consider archive names matching the pattern. see "borg help match-archives". |
  25. +-----------------------------------------------------------------------------+----------------------------------------------+--------------------------------------------------------------------------------------------------+
  26. | | ``--sort-by KEYS`` | Comma-separated list of sorting keys; valid keys are: timestamp, name, id; default is: timestamp |
  27. +-----------------------------------------------------------------------------+----------------------------------------------+--------------------------------------------------------------------------------------------------+
  28. | | ``--first N`` | consider first N archives after other filters were applied |
  29. +-----------------------------------------------------------------------------+----------------------------------------------+--------------------------------------------------------------------------------------------------+
  30. | | ``--last N`` | consider last N archives after other filters were applied |
  31. +-----------------------------------------------------------------------------+----------------------------------------------+--------------------------------------------------------------------------------------------------+
  32. .. raw:: html
  33. <script type='text/javascript'>
  34. $(document).ready(function () {
  35. $('.borg-options-table colgroup').remove();
  36. })
  37. </script>
  38. .. only:: latex
  39. options
  40. -n, --dry-run do not change repository, just check
  41. --other-repo SRC_REPOSITORY transfer archives from the other repository
  42. --upgrader UPGRADER use the upgrader to convert transferred data (default: no conversion)
  43. :ref:`common_options`
  44. |
  45. Archive filters
  46. -a PATTERN, --match-archives PATTERN only consider archive names matching the pattern. see "borg help match-archives".
  47. --sort-by KEYS Comma-separated list of sorting keys; valid keys are: timestamp, name, id; default is: timestamp
  48. --first N consider first N archives after other filters were applied
  49. --last N consider last N archives after other filters were applied
  50. Description
  51. ~~~~~~~~~~~
  52. This command transfers archives from one repository to another repository.
  53. Optionally, it can also upgrade the transferred data.
  54. Suggested use for general purpose archive transfer (not repo upgrades)::
  55. # create a related DST_REPO (reusing key material from SRC_REPO), so that
  56. # chunking and chunk id generation will work in the same way as before.
  57. borg --repo=DST_REPO rcreate --other-repo=SRC_REPO --encryption=DST_ENC
  58. # transfer archives from SRC_REPO to DST_REPO
  59. borg --repo=DST_REPO transfer --other-repo=SRC_REPO --dry-run # check what it would do
  60. borg --repo=DST_REPO transfer --other-repo=SRC_REPO # do it!
  61. borg --repo=DST_REPO transfer --other-repo=SRC_REPO --dry-run # check! anything left?
  62. The default is to transfer all archives, including checkpoint archives.
  63. You could use the misc. archive filter options to limit which archives it will
  64. transfer, e.g. using the -a option. This is recommended for big
  65. repositories with multiple data sets to keep the runtime per invocation lower.
  66. For repository upgrades (e.g. from a borg 1.2 repo to a related borg 2.0 repo), usage is
  67. quite similar to the above::
  68. borg --repo=DST_REPO transfer --other-repo=SRC_REPO --upgrader=From12To20