borg-compression.1 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  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-COMPRESSION" 1 "2023-09-14" "" "borg backup tool"
  31. .SH NAME
  32. borg-compression \- Details regarding compression
  33. .SH DESCRIPTION
  34. .sp
  35. It is no problem to mix different compression methods in one repo,
  36. deduplication is done on the source data chunks (not on the compressed
  37. or encrypted data).
  38. .sp
  39. If some specific chunk was once compressed and stored into the repo, creating
  40. another backup that also uses this chunk will not change the stored chunk.
  41. So if you use different compression specs for the backups, whichever stores a
  42. chunk first determines its compression. See also borg recreate.
  43. .sp
  44. Compression is lz4 by default. If you want something else, you have to specify what you want.
  45. .sp
  46. Valid compression specifiers are:
  47. .INDENT 0.0
  48. .TP
  49. .B none
  50. Do not compress.
  51. .TP
  52. .B lz4
  53. Use lz4 compression. Very high speed, very low compression. (default)
  54. .TP
  55. .B zstd[,L]
  56. Use zstd (\(dqzstandard\(dq) compression, a modern wide\-range algorithm.
  57. If you do not explicitly give the compression level L (ranging from 1
  58. to 22), it will use level 3.
  59. .TP
  60. .B zlib[,L]
  61. Use zlib (\(dqgz\(dq) compression. Medium speed, medium compression.
  62. If you do not explicitly give the compression level L (ranging from 0
  63. to 9), it will use level 6.
  64. Giving level 0 (means \(dqno compression\(dq, but still has zlib protocol
  65. overhead) is usually pointless, you better use \(dqnone\(dq compression.
  66. .TP
  67. .B lzma[,L]
  68. Use lzma (\(dqxz\(dq) compression. Low speed, high compression.
  69. If you do not explicitly give the compression level L (ranging from 0
  70. to 9), it will use level 6.
  71. Giving levels above 6 is pointless and counterproductive because it does
  72. not compress better due to the buffer size used by borg \- but it wastes
  73. lots of CPU cycles and RAM.
  74. .TP
  75. .B auto,C[,L]
  76. Use a built\-in heuristic to decide per chunk whether to compress or not.
  77. The heuristic tries with lz4 whether the data is compressible.
  78. For incompressible data, it will not use compression (uses \(dqnone\(dq).
  79. For compressible data, it uses the given C[,L] compression \- with C[,L]
  80. being any valid compression specifier.
  81. .TP
  82. .B obfuscate,SPEC,C[,L]
  83. Use compressed\-size obfuscation to make fingerprinting attacks based on
  84. the observable stored chunk size more difficult. Note:
  85. .INDENT 7.0
  86. .IP \(bu 2
  87. You must combine this with encryption, or it won\(aqt make any sense.
  88. .IP \(bu 2
  89. Your repo size will be bigger, of course.
  90. .IP \(bu 2
  91. A chunk is limited by the constant \fBMAX_DATA_SIZE\fP (cur. ~20MiB).
  92. .UNINDENT
  93. .sp
  94. The SPEC value determines how the size obfuscation works:
  95. .sp
  96. \fIRelative random reciprocal size variation\fP (multiplicative)
  97. .sp
  98. Size will increase by a factor, relative to the compressed data size.
  99. Smaller factors are used often, larger factors rarely.
  100. .sp
  101. Available factors:
  102. .INDENT 7.0
  103. .INDENT 3.5
  104. .sp
  105. .nf
  106. .ft C
  107. 1: 0.01 .. 100
  108. 2: 0.1 .. 1,000
  109. 3: 1 .. 10,000
  110. 4: 10 .. 100,000
  111. 5: 100 .. 1,000,000
  112. 6: 1,000 .. 10,000,000
  113. .ft P
  114. .fi
  115. .UNINDENT
  116. .UNINDENT
  117. .sp
  118. Example probabilities for SPEC \fB1\fP:
  119. .INDENT 7.0
  120. .INDENT 3.5
  121. .sp
  122. .nf
  123. .ft C
  124. 90 % 0.01 .. 0.1
  125. 9 % 0.1 .. 1
  126. 0.9 % 1 .. 10
  127. 0.09% 10 .. 100
  128. .ft P
  129. .fi
  130. .UNINDENT
  131. .UNINDENT
  132. .sp
  133. \fIRandomly sized padding up to the given size\fP (additive)
  134. .INDENT 7.0
  135. .INDENT 3.5
  136. .sp
  137. .nf
  138. .ft C
  139. 110: 1kiB (2 ^ (SPEC \- 100))
  140. \&...
  141. 120: 1MiB
  142. \&...
  143. 123: 8MiB (max.)
  144. .ft P
  145. .fi
  146. .UNINDENT
  147. .UNINDENT
  148. .UNINDENT
  149. .sp
  150. Examples:
  151. .INDENT 0.0
  152. .INDENT 3.5
  153. .sp
  154. .nf
  155. .ft C
  156. borg create \-\-compression lz4 REPO::ARCHIVE data
  157. borg create \-\-compression zstd REPO::ARCHIVE data
  158. borg create \-\-compression zstd,10 REPO::ARCHIVE data
  159. borg create \-\-compression zlib REPO::ARCHIVE data
  160. borg create \-\-compression zlib,1 REPO::ARCHIVE data
  161. borg create \-\-compression auto,lzma,6 REPO::ARCHIVE data
  162. borg create \-\-compression auto,lzma ...
  163. borg create \-\-compression obfuscate,110,none ...
  164. borg create \-\-compression obfuscate,3,auto,zstd,10 ...
  165. borg create \-\-compression obfuscate,2,zstd,6 ...
  166. .ft P
  167. .fi
  168. .UNINDENT
  169. .UNINDENT
  170. .SH AUTHOR
  171. The Borg Collective
  172. .\" Generated by docutils manpage writer.
  173. .