2
0

borg-recreate.1 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192
  1. .\" Man page generated from reStructuredText.
  2. .
  3. .TH BORG-RECREATE 1 "2017-02-11" "" "borg backup tool"
  4. .SH NAME
  5. borg-recreate \- Re-create archives
  6. .
  7. .nr rst2man-indent-level 0
  8. .
  9. .de1 rstReportMargin
  10. \\$1 \\n[an-margin]
  11. level \\n[rst2man-indent-level]
  12. level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
  13. -
  14. \\n[rst2man-indent0]
  15. \\n[rst2man-indent1]
  16. \\n[rst2man-indent2]
  17. ..
  18. .de1 INDENT
  19. .\" .rstReportMargin pre:
  20. . RS \\$1
  21. . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
  22. . nr rst2man-indent-level +1
  23. .\" .rstReportMargin post:
  24. ..
  25. .de UNINDENT
  26. . RE
  27. .\" indent \\n[an-margin]
  28. .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
  29. .nr rst2man-indent-level -1
  30. .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
  31. .in \\n[rst2man-indent\\n[rst2man-indent-level]]u
  32. ..
  33. .SH SYNOPSIS
  34. .sp
  35. borg recreate <options> REPOSITORY_OR_ARCHIVE PATH
  36. .SH DESCRIPTION
  37. .sp
  38. Recreate the contents of existing archives.
  39. .sp
  40. This is an \fIexperimental\fP feature. Do \fInot\fP use this on your only backup.
  41. .sp
  42. \-\-exclude, \-\-exclude\-from and PATH have the exact same semantics
  43. as in "borg create". If PATHs are specified the resulting archive
  44. will only contain files from these PATHs.
  45. .sp
  46. Note that all paths in an archive are relative, therefore absolute patterns/paths
  47. will \fInot\fP match (\-\-exclude, \-\-exclude\-from, \-\-compression\-from, PATHs).
  48. .sp
  49. \-\-compression: all chunks seen will be stored using the given method.
  50. Due to how Borg stores compressed size information this might display
  51. incorrect information for archives that were not recreated at the same time.
  52. There is no risk of data loss by this.
  53. .sp
  54. \-\-chunker\-params will re\-chunk all files in the archive, this can be
  55. used to have upgraded Borg 0.xx or Attic archives deduplicate with
  56. Borg 1.x archives.
  57. .sp
  58. USE WITH CAUTION.
  59. Depending on the PATHs and patterns given, recreate can be used to permanently
  60. delete files from archives.
  61. When in doubt, use "\-\-dry\-run \-\-verbose \-\-list" to see how patterns/PATHS are
  62. interpreted.
  63. .sp
  64. The archive being recreated is only removed after the operation completes. The
  65. archive that is built during the operation exists at the same time at
  66. "<ARCHIVE>.recreate". The new archive will have a different archive ID.
  67. .sp
  68. With \-\-target the original archive is not replaced, instead a new archive is created.
  69. .sp
  70. When rechunking space usage can be substantial, expect at least the entire
  71. deduplicated size of the archives using the previous chunker params.
  72. When recompressing expect approx. (throughput / checkpoint\-interval) in space usage,
  73. assuming all chunks are recompressed.
  74. .SH OPTIONS
  75. .sp
  76. See \fIborg\-common(1)\fP for common options of Borg commands.
  77. .SS arguments
  78. .INDENT 0.0
  79. .TP
  80. .B REPOSITORY_OR_ARCHIVE
  81. repository/archive to recreate
  82. .TP
  83. .B PATH
  84. paths to recreate; patterns are supported
  85. .UNINDENT
  86. .SS optional arguments
  87. .INDENT 0.0
  88. .TP
  89. .B \-\-list
  90. output verbose list of items (files, dirs, ...)
  91. .TP
  92. .BI \-\-filter \ STATUSCHARS
  93. only display items with the given status characters
  94. .TP
  95. .B \-p\fP,\fB \-\-progress
  96. show progress display while recreating archives
  97. .TP
  98. .B \-n\fP,\fB \-\-dry\-run
  99. do not change anything
  100. .TP
  101. .B \-s\fP,\fB \-\-stats
  102. print statistics at end
  103. .UNINDENT
  104. .SS Exclusion options
  105. .INDENT 0.0
  106. .TP
  107. .BI \-e \ PATTERN\fP,\fB \ \-\-exclude \ PATTERN
  108. exclude paths matching PATTERN
  109. .TP
  110. .BI \-\-exclude\-from \ EXCLUDEFILE
  111. read exclude patterns from EXCLUDEFILE, one per line
  112. .TP
  113. .B \-\-exclude\-caches
  114. exclude directories that contain a CACHEDIR.TAG file (\fI\%http://www.brynosaurus.com/cachedir/spec.html\fP)
  115. .TP
  116. .BI \-\-exclude\-if\-present \ NAME
  117. exclude directories that are tagged by containing a filesystem object with the given NAME
  118. .TP
  119. .B \-\-keep\-exclude\-tags\fP,\fB \-\-keep\-tag\-files
  120. keep tag objects (i.e.: arguments to \-\-exclude\-if\-present) in otherwise excluded caches/directories
  121. .UNINDENT
  122. .SS Archive options
  123. .INDENT 0.0
  124. .TP
  125. .BI \-\-target \ TARGET
  126. create a new archive with the name ARCHIVE, do not replace existing archive (only applies for a single archive)
  127. .TP
  128. .BI \-c \ SECONDS\fP,\fB \ \-\-checkpoint\-interval \ SECONDS
  129. write checkpoint every SECONDS seconds (Default: 1800)
  130. .TP
  131. .BI \-\-comment \ COMMENT
  132. add a comment text to the archive
  133. .TP
  134. .BI \-\-timestamp \ TIMESTAMP
  135. manually specify the archive creation date/time (UTC, yyyy\-mm\-ddThh:mm:ss format). alternatively, give a reference file/directory.
  136. .TP
  137. .BI \-C \ COMPRESSION\fP,\fB \ \-\-compression \ COMPRESSION
  138. select compression algorithm, see the output of the "borg help compression" command for details.
  139. .TP
  140. .B \-\-always\-recompress
  141. always recompress chunks, don\(aqt skip chunks already compressed with the same algorithm.
  142. .TP
  143. .BI \-\-compression\-from \ COMPRESSIONCONFIG
  144. read compression patterns from COMPRESSIONCONFIG, see the output of the "borg help compression" command for details.
  145. .TP
  146. .BI \-\-chunker\-params \ PARAMS
  147. specify the chunker parameters (CHUNK_MIN_EXP, CHUNK_MAX_EXP, HASH_MASK_BITS, HASH_WINDOW_SIZE) or "default" to use the current defaults. default: 19,23,21,4095
  148. .UNINDENT
  149. .SH EXAMPLES
  150. .INDENT 0.0
  151. .INDENT 3.5
  152. .sp
  153. .nf
  154. .ft C
  155. # Make old (Attic / Borg 0.xx) archives deduplicate with Borg 1.x archives
  156. # Archives created with Borg 1.1+ and the default chunker params are skipped (archive ID stays the same)
  157. $ borg recreate /mnt/backup \-\-chunker\-params default \-\-progress
  158. # Create a backup with little but fast compression
  159. $ borg create /mnt/backup::archive /some/files \-\-compression lz4
  160. # Then compress it \- this might take longer, but the backup has already completed, so no inconsistencies
  161. # from a long\-running backup job.
  162. $ borg recreate /mnt/backup::archive \-\-compression zlib,9
  163. # Remove unwanted files from all archives in a repository
  164. $ borg recreate /mnt/backup \-e /home/icke/Pictures/drunk_photos
  165. # Change archive comment
  166. $ borg create \-\-comment "This is a comment" /mnt/backup::archivename ~
  167. $ borg info /mnt/backup::archivename
  168. Name: archivename
  169. Fingerprint: ...
  170. Comment: This is a comment
  171. \&...
  172. $ borg recreate \-\-comment "This is a better comment" /mnt/backup::archivename
  173. $ borg info /mnt/backup::archivename
  174. Name: archivename
  175. Fingerprint: ...
  176. Comment: This is a better comment
  177. \&...
  178. .ft P
  179. .fi
  180. .UNINDENT
  181. .UNINDENT
  182. .SH SEE ALSO
  183. .sp
  184. \fIborg\-common(1)\fP, \fIborg\-patterns(1)\fP, \fIborg\-placeholders(1)\fP, \fIborg\-compression(1)\fP
  185. .SH AUTHOR
  186. The Borg Collective
  187. .\" Generated by docutils manpage writer.
  188. .