borg-diff.1 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  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-DIFF" 1 "2023-09-14" "" "borg backup tool"
  31. .SH NAME
  32. borg-diff \- Diff contents of two archives
  33. .SH SYNOPSIS
  34. .sp
  35. borg [common options] diff [options] ARCHIVE1 ARCHIVE2 [PATH...]
  36. .SH DESCRIPTION
  37. .sp
  38. This command finds differences (file contents, metadata) between ARCHIVE1 and ARCHIVE2.
  39. .sp
  40. For more help on include/exclude patterns, see the \fIborg_patterns\fP command output.
  41. .SH OPTIONS
  42. .sp
  43. See \fIborg\-common(1)\fP for common options of Borg commands.
  44. .SS arguments
  45. .INDENT 0.0
  46. .TP
  47. .B ARCHIVE1
  48. ARCHIVE1 name
  49. .TP
  50. .B ARCHIVE2
  51. ARCHIVE2 name
  52. .TP
  53. .B PATH
  54. paths of items inside the archives to compare; patterns are supported
  55. .UNINDENT
  56. .SS options
  57. .INDENT 0.0
  58. .TP
  59. .B \-\-numeric\-ids
  60. only consider numeric user and group identifiers
  61. .TP
  62. .B \-\-same\-chunker\-params
  63. Override check of chunker parameters.
  64. .TP
  65. .B \-\-sort
  66. Sort the output lines by file path.
  67. .TP
  68. .BI \-\-format \ FORMAT
  69. specify format for differences between archives (default: \(dq{change} {path}{NL}\(dq)
  70. .TP
  71. .B \-\-json\-lines
  72. Format output as JSON Lines.
  73. .TP
  74. .B \-\-content\-only
  75. Only compare differences in content (exclude metadata differences)
  76. .UNINDENT
  77. .SS Include/Exclude options
  78. .INDENT 0.0
  79. .TP
  80. .BI \-e \ PATTERN\fR,\fB \ \-\-exclude \ PATTERN
  81. exclude paths matching PATTERN
  82. .TP
  83. .BI \-\-exclude\-from \ EXCLUDEFILE
  84. read exclude patterns from EXCLUDEFILE, one per line
  85. .TP
  86. .BI \-\-pattern \ PATTERN
  87. include/exclude paths matching PATTERN
  88. .TP
  89. .BI \-\-patterns\-from \ PATTERNFILE
  90. read include/exclude patterns from PATTERNFILE, one per line
  91. .UNINDENT
  92. .SH EXAMPLES
  93. .INDENT 0.0
  94. .INDENT 3.5
  95. .sp
  96. .nf
  97. .ft C
  98. $ borg diff archive1 archive2
  99. +17 B \-5 B [\-rw\-r\-\-r\-\- \-> \-rwxr\-xr\-x] file1
  100. +135 B \-252 B file2
  101. added 0 B file4
  102. removed 0 B file3
  103. $ borg diff archive1 archive2
  104. {\(dqpath\(dq: \(dqfile1\(dq, \(dqchanges\(dq: [{\(dqtype\(dq: \(dqmodified\(dq, \(dqadded\(dq: 17, \(dqremoved\(dq: 5}, {\(dqtype\(dq: \(dqmode\(dq, \(dqold_mode\(dq: \(dq\-rw\-r\-\-r\-\-\(dq, \(dqnew_mode\(dq: \(dq\-rwxr\-xr\-x\(dq}]}
  105. {\(dqpath\(dq: \(dqfile2\(dq, \(dqchanges\(dq: [{\(dqtype\(dq: \(dqmodified\(dq, \(dqadded\(dq: 135, \(dqremoved\(dq: 252}]}
  106. {\(dqpath\(dq: \(dqfile4\(dq, \(dqchanges\(dq: [{\(dqtype\(dq: \(dqadded\(dq, \(dqsize\(dq: 0}]}
  107. {\(dqpath\(dq: \(dqfile3\(dq, \(dqchanges\(dq: [{\(dqtype\(dq: \(dqremoved\(dq, \(dqsize\(dq: 0}]}
  108. .ft P
  109. .fi
  110. .UNINDENT
  111. .UNINDENT
  112. .SH NOTES
  113. .SS The FORMAT specifier syntax
  114. .sp
  115. The \fB\-\-format\fP option uses python\(aqs \fI\%format string syntax\fP\&.
  116. .sp
  117. Examples:
  118. .INDENT 0.0
  119. .INDENT 3.5
  120. .sp
  121. .nf
  122. .ft C
  123. $ borg diff \-\-format \(aq{content:30} {path}{NL}\(aq ArchiveFoo ArchiveBar
  124. modified: +4.1 kB \-1.0 kB file\-diff
  125. \&...
  126. # {VAR:<NUMBER} \- pad to NUMBER columns left\-aligned.
  127. # {VAR:>NUMBER} \- pad to NUMBER columns right\-aligned.
  128. $ borg diff \-\-format \(aq{content:>30} {path}{NL}\(aq ArchiveFoo ArchiveBar
  129. modified: +4.1 kB \-1.0 kB file\-diff
  130. \&...
  131. .ft P
  132. .fi
  133. .UNINDENT
  134. .UNINDENT
  135. .sp
  136. The following keys are always available:
  137. .INDENT 0.0
  138. .IP \(bu 2
  139. NEWLINE: OS dependent line separator
  140. .IP \(bu 2
  141. NL: alias of NEWLINE
  142. .IP \(bu 2
  143. NUL: NUL character for creating print0 / xargs \-0 like output
  144. .IP \(bu 2
  145. SPACE: space character
  146. .IP \(bu 2
  147. TAB: tab character
  148. .IP \(bu 2
  149. CR: carriage return character
  150. .IP \(bu 2
  151. LF: line feed character
  152. .UNINDENT
  153. .sp
  154. Keys available only when showing differences between archives:
  155. .INDENT 0.0
  156. .IP \(bu 2
  157. path: archived file path
  158. .IP \(bu 2
  159. change: all available changes
  160. .IP \(bu 2
  161. content: file content change
  162. .IP \(bu 2
  163. mode: file mode change
  164. .IP \(bu 2
  165. type: file type change
  166. .IP \(bu 2
  167. owner: file owner (user/group) change
  168. .IP \(bu 2
  169. group: file group change
  170. .IP \(bu 2
  171. user: file user change
  172. .IP \(bu 2
  173. link: file link change
  174. .IP \(bu 2
  175. directory: file directory change
  176. .IP \(bu 2
  177. blkdev: file block device change
  178. .IP \(bu 2
  179. chrdev: file character device change
  180. .IP \(bu 2
  181. fifo: file fifo change
  182. .IP \(bu 2
  183. mtime: file modification time change
  184. .IP \(bu 2
  185. ctime: file change time change
  186. .IP \(bu 2
  187. isomtime: file modification time change (ISO 8601)
  188. .IP \(bu 2
  189. isoctime: file creation time change (ISO 8601)
  190. .UNINDENT
  191. .SH SEE ALSO
  192. .sp
  193. \fIborg\-common(1)\fP
  194. .SH AUTHOR
  195. The Borg Collective
  196. .\" Generated by docutils manpage writer.
  197. .