diff.rst.inc 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. .. IMPORTANT: this file is auto-generated from borg's built-in help, do not edit!
  2. .. _borg_diff:
  3. borg diff
  4. ---------
  5. .. code-block:: none
  6. borg [common options] diff [options] ARCHIVE1 ARCHIVE2 [PATH...]
  7. .. only:: html
  8. .. class:: borg-options-table
  9. +-------------------------------------------------------+---------------------------------------+----------------------------------------------------------------------------------+
  10. | **positional arguments** |
  11. +-------------------------------------------------------+---------------------------------------+----------------------------------------------------------------------------------+
  12. | | ``ARCHIVE1`` | ARCHIVE1 name |
  13. +-------------------------------------------------------+---------------------------------------+----------------------------------------------------------------------------------+
  14. | | ``ARCHIVE2`` | ARCHIVE2 name |
  15. +-------------------------------------------------------+---------------------------------------+----------------------------------------------------------------------------------+
  16. | | ``PATH`` | paths of items inside the archives to compare; patterns are supported |
  17. +-------------------------------------------------------+---------------------------------------+----------------------------------------------------------------------------------+
  18. | **options** |
  19. +-------------------------------------------------------+---------------------------------------+----------------------------------------------------------------------------------+
  20. | | ``--numeric-ids`` | only consider numeric user and group identifiers |
  21. +-------------------------------------------------------+---------------------------------------+----------------------------------------------------------------------------------+
  22. | | ``--same-chunker-params`` | Override check of chunker parameters. |
  23. +-------------------------------------------------------+---------------------------------------+----------------------------------------------------------------------------------+
  24. | | ``--sort`` | Sort the output lines by file path. |
  25. +-------------------------------------------------------+---------------------------------------+----------------------------------------------------------------------------------+
  26. | | ``--format FORMAT`` | specify format for differences between archives (default: "{change} {path}{NL}") |
  27. +-------------------------------------------------------+---------------------------------------+----------------------------------------------------------------------------------+
  28. | | ``--json-lines`` | Format output as JSON Lines. |
  29. +-------------------------------------------------------+---------------------------------------+----------------------------------------------------------------------------------+
  30. | | ``--content-only`` | Only compare differences in content (exclude metadata differences) |
  31. +-------------------------------------------------------+---------------------------------------+----------------------------------------------------------------------------------+
  32. | .. class:: borg-common-opt-ref |
  33. | |
  34. | :ref:`common_options` |
  35. +-------------------------------------------------------+---------------------------------------+----------------------------------------------------------------------------------+
  36. | **Include/Exclude options** |
  37. +-------------------------------------------------------+---------------------------------------+----------------------------------------------------------------------------------+
  38. | | ``-e PATTERN``, ``--exclude PATTERN`` | exclude paths matching PATTERN |
  39. +-------------------------------------------------------+---------------------------------------+----------------------------------------------------------------------------------+
  40. | | ``--exclude-from EXCLUDEFILE`` | read exclude patterns from EXCLUDEFILE, one per line |
  41. +-------------------------------------------------------+---------------------------------------+----------------------------------------------------------------------------------+
  42. | | ``--pattern PATTERN`` | include/exclude paths matching PATTERN |
  43. +-------------------------------------------------------+---------------------------------------+----------------------------------------------------------------------------------+
  44. | | ``--patterns-from PATTERNFILE`` | read include/exclude patterns from PATTERNFILE, one per line |
  45. +-------------------------------------------------------+---------------------------------------+----------------------------------------------------------------------------------+
  46. .. raw:: html
  47. <script type='text/javascript'>
  48. $(document).ready(function () {
  49. $('.borg-options-table colgroup').remove();
  50. })
  51. </script>
  52. .. only:: latex
  53. ARCHIVE1
  54. ARCHIVE1 name
  55. ARCHIVE2
  56. ARCHIVE2 name
  57. PATH
  58. paths of items inside the archives to compare; patterns are supported
  59. options
  60. --numeric-ids only consider numeric user and group identifiers
  61. --same-chunker-params Override check of chunker parameters.
  62. --sort Sort the output lines by file path.
  63. --format FORMAT specify format for differences between archives (default: "{change} {path}{NL}")
  64. --json-lines Format output as JSON Lines.
  65. --content-only Only compare differences in content (exclude metadata differences)
  66. :ref:`common_options`
  67. |
  68. Include/Exclude options
  69. -e PATTERN, --exclude PATTERN exclude paths matching PATTERN
  70. --exclude-from EXCLUDEFILE read exclude patterns from EXCLUDEFILE, one per line
  71. --pattern PATTERN include/exclude paths matching PATTERN
  72. --patterns-from PATTERNFILE read include/exclude patterns from PATTERNFILE, one per line
  73. Description
  74. ~~~~~~~~~~~
  75. This command finds differences (file contents, metadata) between ARCHIVE1 and ARCHIVE2.
  76. For more help on include/exclude patterns, see the :ref:`borg_patterns` command output.
  77. .. man NOTES
  78. The FORMAT specifier syntax
  79. +++++++++++++++++++++++++++
  80. The ``--format`` option uses python's `format string syntax
  81. <https://docs.python.org/3.9/library/string.html#formatstrings>`_.
  82. Examples:
  83. ::
  84. $ borg diff --format '{content:30} {path}{NL}' ArchiveFoo ArchiveBar
  85. modified: +4.1 kB -1.0 kB file-diff
  86. ...
  87. # {VAR:<NUMBER} - pad to NUMBER columns left-aligned.
  88. # {VAR:>NUMBER} - pad to NUMBER columns right-aligned.
  89. $ borg diff --format '{content:>30} {path}{NL}' ArchiveFoo ArchiveBar
  90. modified: +4.1 kB -1.0 kB file-diff
  91. ...
  92. The following keys are always available:
  93. - NEWLINE: OS dependent line separator
  94. - NL: alias of NEWLINE
  95. - NUL: NUL character for creating print0 / xargs -0 like output
  96. - SPACE: space character
  97. - TAB: tab character
  98. - CR: carriage return character
  99. - LF: line feed character
  100. Keys available only when showing differences between archives:
  101. - path: archived file path
  102. - change: all available changes
  103. - content: file content change
  104. - mode: file mode change
  105. - type: file type change
  106. - owner: file owner (user/group) change
  107. - group: file group change
  108. - user: file user change
  109. - link: file link change
  110. - directory: file directory change
  111. - blkdev: file block device change
  112. - chrdev: file character device change
  113. - fifo: file fifo change
  114. - mtime: file modification time change
  115. - ctime: file change time change
  116. - isomtime: file modification time change (ISO 8601)
  117. - isoctime: file creation time change (ISO 8601)