borg-transfer.1 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. .\" Man page generated from reStructuredText.
  2. .
  3. .
  4. .nr rst2man-indent-level 0
  5. .
  6. .de1 rstReportMargin
  7. \\$1 \\n[an-margin]
  8. level \\n[rst2man-indent-level]
  9. level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
  10. -
  11. \\n[rst2man-indent0]
  12. \\n[rst2man-indent1]
  13. \\n[rst2man-indent2]
  14. ..
  15. .de1 INDENT
  16. .\" .rstReportMargin pre:
  17. . RS \\$1
  18. . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
  19. . nr rst2man-indent-level +1
  20. .\" .rstReportMargin post:
  21. ..
  22. .de UNINDENT
  23. . RE
  24. .\" indent \\n[an-margin]
  25. .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
  26. .nr rst2man-indent-level -1
  27. .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
  28. .in \\n[rst2man-indent\\n[rst2man-indent-level]]u
  29. ..
  30. .TH "BORG-TRANSFER" 1 "2022-06-26" "" "borg backup tool"
  31. .SH NAME
  32. borg-transfer \- archives transfer from other repository
  33. .SH SYNOPSIS
  34. .sp
  35. borg [common options] transfer [options]
  36. .SH DESCRIPTION
  37. .sp
  38. This command transfers archives from one repository to another repository.
  39. .sp
  40. Suggested use:
  41. .INDENT 0.0
  42. .INDENT 3.5
  43. .sp
  44. .nf
  45. .ft C
  46. # initialize DST_REPO reusing key material from SRC_REPO, so that
  47. # chunking and chunk id generation will work in the same way as before.
  48. borg \-\-repo=DST_REPO init \-\-other\-repo=SRC_REPO \-\-encryption=DST_ENC
  49. # transfer archives from SRC_REPO to DST_REPO
  50. borg \-\-repo=DST_REPO transfer \-\-other\-repo=SRC_REPO \-\-dry\-run # check what it would do
  51. borg \-\-repo=DST_REPO transfer \-\-other\-repo=SRC_REPO # do it!
  52. borg \-\-repo=DST_REPO transfer \-\-other\-repo=SRC_REPO \-\-dry\-run # check! anything left?
  53. .ft P
  54. .fi
  55. .UNINDENT
  56. .UNINDENT
  57. .sp
  58. The default is to transfer all archives, including checkpoint archives.
  59. .sp
  60. You could use the misc. archive filter options to limit which archives it will
  61. transfer, e.g. using the \-a option. This is recommended for big
  62. repositories with multiple data sets to keep the runtime per invocation lower.
  63. .SH OPTIONS
  64. .sp
  65. See \fIborg\-common(1)\fP for common options of Borg commands.
  66. .SS optional arguments
  67. .INDENT 0.0
  68. .TP
  69. .B \-n\fP,\fB \-\-dry\-run
  70. do not change repository, just check
  71. .TP
  72. .BI \-\-other\-repo \ SRC_REPOSITORY
  73. transfer archives from the other repository
  74. .UNINDENT
  75. .SS Archive filters
  76. .INDENT 0.0
  77. .TP
  78. .BI \-P \ PREFIX\fR,\fB \ \-\-prefix \ PREFIX
  79. only consider archive names starting with this prefix.
  80. .TP
  81. .BI \-a \ GLOB\fR,\fB \ \-\-glob\-archives \ GLOB
  82. only consider archive names matching the glob. sh: rules apply, see "borg help patterns". \fB\-\-prefix\fP and \fB\-\-glob\-archives\fP are mutually exclusive.
  83. .TP
  84. .BI \-\-sort\-by \ KEYS
  85. Comma\-separated list of sorting keys; valid keys are: timestamp, name, id; default is: timestamp
  86. .TP
  87. .BI \-\-first \ N
  88. consider first N archives after other filters were applied
  89. .TP
  90. .BI \-\-last \ N
  91. consider last N archives after other filters were applied
  92. .UNINDENT
  93. .SH EXAMPLES
  94. .INDENT 0.0
  95. .INDENT 3.5
  96. .sp
  97. .nf
  98. .ft C
  99. # 0. Have borg 2.0 installed on client AND server, have a b12 repo copy for testing.
  100. # 1. Create a new "related" repository:
  101. # here, the existing borg 1.2 repo used repokey\-blake2 (and aes\-ctr mode),
  102. # thus we use repokey\-blake2\-aes\-ocb for the new borg 2.0 repo.
  103. # staying with the same chunk id algorithm (blake2) and with the same
  104. # key material (via \-\-other\-repo <oldrepo>) will make deduplication work
  105. # between old archives (copied with borg transfer) and future ones.
  106. # the AEAD cipher does not matter (everything must be re\-encrypted and
  107. # re\-authenticated anyway), you could also choose repokey\-blake2\-chacha20\-poly1305.
  108. # in case your old borg repo did not use blake2, just remove the "\-blake2".
  109. $ borg \-\-repo ssh://borg2@borgbackup/./tests/b20 rcreate \e
  110. \-\-other\-repo ssh://borg2@borgbackup/./tests/b12 \-e repokey\-blake2\-aes\-ocb
  111. # 2. Check what and how much it would transfer:
  112. $ borg \-\-repo ssh://borg2@borgbackup/./tests/b20 transfer \e
  113. \-\-other\-repo ssh://borg2@borgbackup/./tests/b12 \-\-dry\-run
  114. # 3. Transfer (copy) archives from old repo into new repo (takes time and space!):
  115. $ borg \-\-repo ssh://borg2@borgbackup/./tests/b20 transfer \e
  116. \-\-other\-repo ssh://borg2@borgbackup/./tests/b12
  117. # 4. Check if we have everything (same as 2.):
  118. $ borg \-\-repo ssh://borg2@borgbackup/./tests/b20 transfer \e
  119. \-\-other\-repo ssh://borg2@borgbackup/./tests/b12 \-\-dry\-run
  120. .ft P
  121. .fi
  122. .UNINDENT
  123. .UNINDENT
  124. .SH SEE ALSO
  125. .sp
  126. \fIborg\-common(1)\fP
  127. .SH AUTHOR
  128. The Borg Collective
  129. .\" Generated by docutils manpage writer.
  130. .