transfer.rst.inc 10.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  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. | | ``--oldest TIMESPAN`` | consider archives between the oldest archive's timestamp and (oldest + TIMESPAN), e.g. 7d or 12m. |
  33. +-----------------------------------------------------------------------------+----------------------------------------------+---------------------------------------------------------------------------------------------------+
  34. | | ``--newest TIMESPAN`` | consider archives between the newest archive's timestamp and (newest - TIMESPAN), e.g. 7d or 12m. |
  35. +-----------------------------------------------------------------------------+----------------------------------------------+---------------------------------------------------------------------------------------------------+
  36. | | ``--older TIMESPAN`` | consider archives older than (now - TIMESPAN), e.g. 7d oder 12m. |
  37. +-----------------------------------------------------------------------------+----------------------------------------------+---------------------------------------------------------------------------------------------------+
  38. | | ``--newer TIMESPAN`` | consider archives newer than (now - TIMESPAN), e.g. 7d or 12m. |
  39. +-----------------------------------------------------------------------------+----------------------------------------------+---------------------------------------------------------------------------------------------------+
  40. .. raw:: html
  41. <script type='text/javascript'>
  42. $(document).ready(function () {
  43. $('.borg-options-table colgroup').remove();
  44. })
  45. </script>
  46. .. only:: latex
  47. options
  48. -n, --dry-run do not change repository, just check
  49. --other-repo SRC_REPOSITORY transfer archives from the other repository
  50. --upgrader UPGRADER use the upgrader to convert transferred data (default: no conversion)
  51. :ref:`common_options`
  52. |
  53. Archive filters
  54. -a PATTERN, --match-archives PATTERN only consider archive names matching the pattern. see "borg help match-archives".
  55. --sort-by KEYS Comma-separated list of sorting keys; valid keys are: timestamp, name, id; default is: timestamp
  56. --first N consider first N archives after other filters were applied
  57. --last N consider last N archives after other filters were applied
  58. --oldest TIMESPAN consider archives between the oldest archive's timestamp and (oldest + TIMESPAN), e.g. 7d or 12m.
  59. --newest TIMESPAN consider archives between the newest archive's timestamp and (newest - TIMESPAN), e.g. 7d or 12m.
  60. --older TIMESPAN consider archives older than (now - TIMESPAN), e.g. 7d oder 12m.
  61. --newer TIMESPAN consider archives newer than (now - TIMESPAN), e.g. 7d or 12m.
  62. Description
  63. ~~~~~~~~~~~
  64. This command transfers archives from one repository to another repository.
  65. Optionally, it can also upgrade the transferred data.
  66. Suggested use for general purpose archive transfer (not repo upgrades)::
  67. # create a related DST_REPO (reusing key material from SRC_REPO), so that
  68. # chunking and chunk id generation will work in the same way as before.
  69. borg --repo=DST_REPO rcreate --other-repo=SRC_REPO --encryption=DST_ENC
  70. # transfer archives from SRC_REPO to DST_REPO
  71. borg --repo=DST_REPO transfer --other-repo=SRC_REPO --dry-run # check what it would do
  72. borg --repo=DST_REPO transfer --other-repo=SRC_REPO # do it!
  73. borg --repo=DST_REPO transfer --other-repo=SRC_REPO --dry-run # check! anything left?
  74. The default is to transfer all archives, including checkpoint archives.
  75. You could use the misc. archive filter options to limit which archives it will
  76. transfer, e.g. using the -a option. This is recommended for big
  77. repositories with multiple data sets to keep the runtime per invocation lower.
  78. For repository upgrades (e.g. from a borg 1.2 repo to a related borg 2.0 repo), usage is
  79. quite similar to the above::
  80. borg --repo=DST_REPO transfer --other-repo=SRC_REPO --upgrader=From12To20