2
0

borg-diff.1 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  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 "2022-02-19" "" "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] REPO::ARCHIVE1 ARCHIVE2 [PATH...]
  36. .SH DESCRIPTION
  37. .sp
  38. This command finds differences (file contents, user/group/mode) between archives.
  39. .sp
  40. A repository location and an archive name must be specified for REPO::ARCHIVE1.
  41. ARCHIVE2 is just another archive name in same repository (no repository location
  42. allowed).
  43. .sp
  44. For archives created with Borg 1.1 or newer diff automatically detects whether
  45. the archives are created with the same chunker params. If so, only chunk IDs
  46. are compared, which is very fast.
  47. .sp
  48. For archives prior to Borg 1.1 chunk contents are compared by default.
  49. If you did not create the archives with different chunker params,
  50. pass \fB\-\-same\-chunker\-params\fP\&.
  51. Note that the chunker params changed from Borg 0.xx to 1.0.
  52. .sp
  53. For more help on include/exclude patterns, see the \fIborg_patterns\fP command output.
  54. .SH OPTIONS
  55. .sp
  56. See \fIborg\-common(1)\fP for common options of Borg commands.
  57. .SS arguments
  58. .INDENT 0.0
  59. .TP
  60. .B REPO::ARCHIVE1
  61. repository location and ARCHIVE1 name
  62. .TP
  63. .B ARCHIVE2
  64. ARCHIVE2 name (no repository location allowed)
  65. .TP
  66. .B PATH
  67. paths of items inside the archives to compare; patterns are supported
  68. .UNINDENT
  69. .SS optional arguments
  70. .INDENT 0.0
  71. .TP
  72. .B \-\-numeric\-owner
  73. deprecated, use \fB\-\-numeric\-ids\fP instead
  74. .TP
  75. .B \-\-numeric\-ids
  76. only consider numeric user and group identifiers
  77. .TP
  78. .B \-\-same\-chunker\-params
  79. Override check of chunker parameters.
  80. .TP
  81. .B \-\-sort
  82. Sort the output lines by file path.
  83. .TP
  84. .B \-\-json\-lines
  85. Format output as JSON Lines.
  86. .UNINDENT
  87. .SS Exclusion options
  88. .INDENT 0.0
  89. .TP
  90. .BI \-e \ PATTERN\fR,\fB \ \-\-exclude \ PATTERN
  91. exclude paths matching PATTERN
  92. .TP
  93. .BI \-\-exclude\-from \ EXCLUDEFILE
  94. read exclude patterns from EXCLUDEFILE, one per line
  95. .TP
  96. .BI \-\-pattern \ PATTERN
  97. include/exclude paths matching PATTERN
  98. .TP
  99. .BI \-\-patterns\-from \ PATTERNFILE
  100. read include/exclude patterns from PATTERNFILE, one per line
  101. .UNINDENT
  102. .SH EXAMPLES
  103. .INDENT 0.0
  104. .INDENT 3.5
  105. .sp
  106. .nf
  107. .ft C
  108. $ borg init \-e=none testrepo
  109. $ mkdir testdir
  110. $ cd testdir
  111. $ echo asdf > file1
  112. $ dd if=/dev/urandom bs=1M count=4 > file2
  113. $ touch file3
  114. $ borg create ../testrepo::archive1 .
  115. $ chmod a+x file1
  116. $ echo "something" >> file2
  117. $ borg create ../testrepo::archive2 .
  118. $ echo "testing 123" >> file1
  119. $ rm file3
  120. $ touch file4
  121. $ borg create ../testrepo::archive3 .
  122. $ cd ..
  123. $ borg diff testrepo::archive1 archive2
  124. [\-rw\-r\-\-r\-\- \-> \-rwxr\-xr\-x] file1
  125. +135 B \-252 B file2
  126. $ borg diff testrepo::archive2 archive3
  127. +17 B \-5 B file1
  128. added 0 B file4
  129. removed 0 B file3
  130. $ borg diff testrepo::archive1 archive3
  131. +17 B \-5 B [\-rw\-r\-\-r\-\- \-> \-rwxr\-xr\-x] file1
  132. +135 B \-252 B file2
  133. added 0 B file4
  134. removed 0 B file3
  135. $ borg diff \-\-json\-lines testrepo::archive1 archive3
  136. {"path": "file1", "changes": [{"type": "modified", "added": 17, "removed": 5}, {"type": "mode", "old_mode": "\-rw\-r\-\-r\-\-", "new_mode": "\-rwxr\-xr\-x"}]}
  137. {"path": "file2", "changes": [{"type": "modified", "added": 135, "removed": 252}]}
  138. {"path": "file4", "changes": [{"type": "added", "size": 0}]}
  139. {"path": "file3", "changes": [{"type": "removed", "size": 0}]
  140. .ft P
  141. .fi
  142. .UNINDENT
  143. .UNINDENT
  144. .SH SEE ALSO
  145. .sp
  146. \fIborg\-common(1)\fP
  147. .SH AUTHOR
  148. The Borg Collective
  149. .\" Generated by docutils manpage writer.
  150. .