borg-transfer.1 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  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. .TP
  96. .B ::
  97. # 0. Have borg 2.0 installed on client AND server, have a b12 repo copy for testing.
  98. .sp
  99. # 1. Create a new "related" repository:
  100. # here, the existing borg 1.2 repo used repokey\-blake2 (and aes\-ctr mode),
  101. # thus we use repokey\-blake2\-aes\-ocb for the new borg 2.0 repo.
  102. # staying with the same chunk id algorithm (blake2) and with the same
  103. # key material (via \-\-other\-repo <oldrepo>) will make deduplication work
  104. # between old archives (copied with borg transfer) and future ones.
  105. # the AEAD cipher does not matter (everything must be re\-encrypted and
  106. # re\-authenticated anyway), you could also choose repokey\-blake2\-chacha20\-poly1305.
  107. # in case your old borg repo did not use blake2, just remove the "\-blake2".
  108. $ borg \-\-repo \fI\%ssh://borg2@borgbackup/./tests/b20\fP rcreate
  109. .IP "System Message: ERROR/3 (docs/borg-transfer.rst:, line 88)"
  110. Unexpected indentation.
  111. .INDENT 7.0
  112. .INDENT 3.5
  113. \-\-other\-repo \fI\%ssh://borg2@borgbackup/./tests/b12\fP \-e repokey\-blake2\-aes\-ocb
  114. .UNINDENT
  115. .UNINDENT
  116. .sp
  117. # 2. Check what and how much it would transfer:
  118. $ borg \-\-repo \fI\%ssh://borg2@borgbackup/./tests/b20\fP transfer
  119. .IP "System Message: ERROR/3 (docs/borg-transfer.rst:, line 92)"
  120. Unexpected indentation.
  121. .INDENT 7.0
  122. .INDENT 3.5
  123. \-\-other\-repo \fI\%ssh://borg2@borgbackup/./tests/b12\fP \-\-dry\-run
  124. .UNINDENT
  125. .UNINDENT
  126. .sp
  127. # 3. Transfer (copy) archives from old repo into new repo (takes time and space!):
  128. $ borg \-\-repo \fI\%ssh://borg2@borgbackup/./tests/b20\fP transfer
  129. .IP "System Message: ERROR/3 (docs/borg-transfer.rst:, line 96)"
  130. Unexpected indentation.
  131. .INDENT 7.0
  132. .INDENT 3.5
  133. \-\-other\-repo \fI\%ssh://borg2@borgbackup/./tests/b12\fP
  134. .UNINDENT
  135. .UNINDENT
  136. .sp
  137. # 4. Check if we have everything (same as 2.):
  138. $ borg \-\-repo \fI\%ssh://borg2@borgbackup/./tests/b20\fP transfer
  139. .IP "System Message: ERROR/3 (docs/borg-transfer.rst:, line 100)"
  140. Unexpected indentation.
  141. .INDENT 7.0
  142. .INDENT 3.5
  143. \-\-other\-repo \fI\%ssh://borg2@borgbackup/./tests/b12\fP \-\-dry\-run
  144. .UNINDENT
  145. .UNINDENT
  146. .UNINDENT
  147. .SH SEE ALSO
  148. .sp
  149. \fIborg\-common(1)\fP
  150. .SH AUTHOR
  151. The Borg Collective
  152. .\" Generated by docutils manpage writer.
  153. .