transfer.rst.inc 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  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. | **optional arguments** |
  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. | .. class:: borg-common-opt-ref |
  17. | |
  18. | :ref:`common_options` |
  19. +-----------------------------------------------------------------------------+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+
  20. | **Archive filters** — Archive filters can be applied to repository targets. |
  21. +-----------------------------------------------------------------------------+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+
  22. | | ``-P PREFIX``, ``--prefix PREFIX`` | only consider archive names starting with this prefix. |
  23. +-----------------------------------------------------------------------------+---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+
  24. | | ``-a GLOB``, ``--glob-archives GLOB`` | only consider archive names matching the glob. sh: rules apply, see "borg help patterns". ``--prefix`` and ``--glob-archives`` are mutually exclusive. |
  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. optional arguments
  40. -n, --dry-run do not change repository, just check
  41. --other-repo SRC_REPOSITORY transfer archives from the other repository
  42. :ref:`common_options`
  43. |
  44. Archive filters
  45. -P PREFIX, --prefix PREFIX only consider archive names starting with this prefix.
  46. -a GLOB, --glob-archives GLOB only consider archive names matching the glob. sh: rules apply, see "borg help patterns". ``--prefix`` and ``--glob-archives`` are mutually exclusive.
  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. Suggested use::
  54. # initialize DST_REPO reusing key material from SRC_REPO, so that
  55. # chunking and chunk id generation will work in the same way as before.
  56. borg --repo=DST_REPO init --other-repo=SRC_REPO --encryption=DST_ENC
  57. # transfer archives from SRC_REPO to DST_REPO
  58. borg --repo=DST_REPO transfer --other-repo=SRC_REPO --dry-run # check what it would do
  59. borg --repo=DST_REPO transfer --other-repo=SRC_REPO # do it!
  60. borg --repo=DST_REPO transfer --other-repo=SRC_REPO --dry-run # check! anything left?
  61. The default is to transfer all archives, including checkpoint archives.
  62. You could use the misc. archive filter options to limit which archives it will
  63. transfer, e.g. using the -a option. This is recommended for big
  64. repositories with multiple data sets to keep the runtime per invocation lower.