borg-transfer.1 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  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-09-10" "" "borg backup tool"
  31. .SH NAME
  32. borg-transfer \- archives transfer from other repository, optionally upgrade data format
  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. Optionally, it can also upgrade the transferred data.
  40. .sp
  41. Suggested use for general purpose archive transfer (not repo upgrades):
  42. .INDENT 0.0
  43. .INDENT 3.5
  44. .sp
  45. .nf
  46. .ft C
  47. # create a related DST_REPO (reusing key material from SRC_REPO), so that
  48. # chunking and chunk id generation will work in the same way as before.
  49. borg \-\-repo=DST_REPO rcreate \-\-other\-repo=SRC_REPO \-\-encryption=DST_ENC
  50. # transfer archives from SRC_REPO to DST_REPO
  51. borg \-\-repo=DST_REPO transfer \-\-other\-repo=SRC_REPO \-\-dry\-run # check what it would do
  52. borg \-\-repo=DST_REPO transfer \-\-other\-repo=SRC_REPO # do it!
  53. borg \-\-repo=DST_REPO transfer \-\-other\-repo=SRC_REPO \-\-dry\-run # check! anything left?
  54. .ft P
  55. .fi
  56. .UNINDENT
  57. .UNINDENT
  58. .sp
  59. The default is to transfer all archives, including checkpoint archives.
  60. .sp
  61. You could use the misc. archive filter options to limit which archives it will
  62. transfer, e.g. using the \-a option. This is recommended for big
  63. repositories with multiple data sets to keep the runtime per invocation lower.
  64. .sp
  65. For repository upgrades (e.g. from a borg 1.2 repo to a related borg 2.0 repo), usage is
  66. quite similar to the above:
  67. .INDENT 0.0
  68. .INDENT 3.5
  69. .sp
  70. .nf
  71. .ft C
  72. borg \-\-repo=DST_REPO transfer \-\-other\-repo=SRC_REPO \-\-upgrader=From12To20
  73. .ft P
  74. .fi
  75. .UNINDENT
  76. .UNINDENT
  77. .SH OPTIONS
  78. .sp
  79. See \fIborg\-common(1)\fP for common options of Borg commands.
  80. .SS optional arguments
  81. .INDENT 0.0
  82. .TP
  83. .B \-n\fP,\fB \-\-dry\-run
  84. do not change repository, just check
  85. .TP
  86. .BI \-\-other\-repo \ SRC_REPOSITORY
  87. transfer archives from the other repository
  88. .TP
  89. .BI \-\-upgrader \ UPGRADER
  90. use the upgrader to convert transferred data (default: no conversion)
  91. .UNINDENT
  92. .SS Archive filters
  93. .INDENT 0.0
  94. .TP
  95. .BI \-a \ GLOB\fR,\fB \ \-\-glob\-archives \ GLOB
  96. only consider archive names matching the glob. sh: rules apply, see \(dqborg help patterns\(dq.
  97. .TP
  98. .BI \-\-sort\-by \ KEYS
  99. Comma\-separated list of sorting keys; valid keys are: timestamp, name, id; default is: timestamp
  100. .TP
  101. .BI \-\-first \ N
  102. consider first N archives after other filters were applied
  103. .TP
  104. .BI \-\-last \ N
  105. consider last N archives after other filters were applied
  106. .UNINDENT
  107. .SH EXAMPLES
  108. .INDENT 0.0
  109. .INDENT 3.5
  110. .sp
  111. .nf
  112. .ft C
  113. # 0. Have borg 2.0 installed on client AND server, have a b12 repo copy for testing.
  114. # 1. Create a new \(dqrelated\(dq repository:
  115. # here, the existing borg 1.2 repo used repokey\-blake2 (and aes\-ctr mode),
  116. # thus we use repokey\-blake2\-aes\-ocb for the new borg 2.0 repo.
  117. # staying with the same chunk id algorithm (blake2) and with the same
  118. # key material (via \-\-other\-repo <oldrepo>) will make deduplication work
  119. # between old archives (copied with borg transfer) and future ones.
  120. # the AEAD cipher does not matter (everything must be re\-encrypted and
  121. # re\-authenticated anyway), you could also choose repokey\-blake2\-chacha20\-poly1305.
  122. # in case your old borg repo did not use blake2, just remove the \(dq\-blake2\(dq.
  123. $ borg \-\-repo ssh://borg2@borgbackup/./tests/b20 rcreate \e
  124. \-\-other\-repo ssh://borg2@borgbackup/./tests/b12 \-e repokey\-blake2\-aes\-ocb
  125. # 2. Check what and how much it would transfer:
  126. $ borg \-\-repo ssh://borg2@borgbackup/./tests/b20 transfer \-\-upgrader=From12To20 \e
  127. \-\-other\-repo ssh://borg2@borgbackup/./tests/b12 \-\-dry\-run
  128. # 3. Transfer (copy) archives from old repo into new repo (takes time and space!):
  129. $ borg \-\-repo ssh://borg2@borgbackup/./tests/b20 transfer \-\-upgrader=From12To20 \e
  130. \-\-other\-repo ssh://borg2@borgbackup/./tests/b12
  131. # 4. Check if we have everything (same as 2.):
  132. $ borg \-\-repo ssh://borg2@borgbackup/./tests/b20 transfer \-\-upgrader=From12To20 \e
  133. \-\-other\-repo ssh://borg2@borgbackup/./tests/b12 \-\-dry\-run
  134. .ft P
  135. .fi
  136. .UNINDENT
  137. .UNINDENT
  138. .SH SEE ALSO
  139. .sp
  140. \fIborg\-common(1)\fP
  141. .SH AUTHOR
  142. The Borg Collective
  143. .\" Generated by docutils manpage writer.
  144. .