1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2024-12-29 11:16:43 +00:00
borg/docs/usage/diff.rst.inc

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

151 lines
9.8 KiB
PHP
Raw Normal View History

2016-07-05 23:33:53 +00:00
.. IMPORTANT: this file is auto-generated from borg's built-in help, do not edit!
.. _borg_diff:
borg diff
---------
.. code-block:: none
2022-06-23 23:19:19 +00:00
borg [common options] diff [options] ARCHIVE1 ARCHIVE2 [PATH...]
2017-06-20 13:22:24 +00:00
.. only:: html
.. class:: borg-options-table
2023-06-11 21:09:20 +00:00
+-------------------------------------------------------+---------------------------------------+----------------------------------------------------------------------------------+
| **positional arguments** |
+-------------------------------------------------------+---------------------------------------+----------------------------------------------------------------------------------+
| | ``ARCHIVE1`` | ARCHIVE1 name |
+-------------------------------------------------------+---------------------------------------+----------------------------------------------------------------------------------+
| | ``ARCHIVE2`` | ARCHIVE2 name |
+-------------------------------------------------------+---------------------------------------+----------------------------------------------------------------------------------+
| | ``PATH`` | paths of items inside the archives to compare; patterns are supported |
+-------------------------------------------------------+---------------------------------------+----------------------------------------------------------------------------------+
2024-07-19 18:40:15 +00:00
| **optional arguments** |
2023-06-11 21:09:20 +00:00
+-------------------------------------------------------+---------------------------------------+----------------------------------------------------------------------------------+
| | ``--numeric-ids`` | only consider numeric user and group identifiers |
+-------------------------------------------------------+---------------------------------------+----------------------------------------------------------------------------------+
| | ``--same-chunker-params`` | Override check of chunker parameters. |
+-------------------------------------------------------+---------------------------------------+----------------------------------------------------------------------------------+
| | ``--sort`` | Sort the output lines by file path. |
+-------------------------------------------------------+---------------------------------------+----------------------------------------------------------------------------------+
| | ``--format FORMAT`` | specify format for differences between archives (default: "{change} {path}{NL}") |
+-------------------------------------------------------+---------------------------------------+----------------------------------------------------------------------------------+
| | ``--json-lines`` | Format output as JSON Lines. |
+-------------------------------------------------------+---------------------------------------+----------------------------------------------------------------------------------+
| | ``--content-only`` | Only compare differences in content (exclude metadata differences) |
+-------------------------------------------------------+---------------------------------------+----------------------------------------------------------------------------------+
| .. class:: borg-common-opt-ref |
| |
| :ref:`common_options` |
+-------------------------------------------------------+---------------------------------------+----------------------------------------------------------------------------------+
| **Include/Exclude options** |
+-------------------------------------------------------+---------------------------------------+----------------------------------------------------------------------------------+
| | ``-e PATTERN``, ``--exclude PATTERN`` | exclude paths matching PATTERN |
+-------------------------------------------------------+---------------------------------------+----------------------------------------------------------------------------------+
| | ``--exclude-from EXCLUDEFILE`` | read exclude patterns from EXCLUDEFILE, one per line |
+-------------------------------------------------------+---------------------------------------+----------------------------------------------------------------------------------+
| | ``--pattern PATTERN`` | include/exclude paths matching PATTERN |
+-------------------------------------------------------+---------------------------------------+----------------------------------------------------------------------------------+
| | ``--patterns-from PATTERNFILE`` | read include/exclude patterns from PATTERNFILE, one per line |
+-------------------------------------------------------+---------------------------------------+----------------------------------------------------------------------------------+
2017-06-20 13:22:24 +00:00
.. raw:: html
<script type='text/javascript'>
$(document).ready(function () {
2017-06-20 13:22:24 +00:00
$('.borg-options-table colgroup').remove();
})
</script>
.. only:: latex
2022-06-23 23:19:19 +00:00
ARCHIVE1
ARCHIVE1 name
2017-06-20 13:22:24 +00:00
ARCHIVE2
2022-06-23 23:19:19 +00:00
ARCHIVE2 name
2017-06-20 13:22:24 +00:00
PATH
paths of items inside the archives to compare; patterns are supported
2024-07-19 18:40:15 +00:00
optional arguments
2021-05-11 20:33:55 +00:00
--numeric-ids only consider numeric user and group identifiers
2017-06-20 13:22:24 +00:00
--same-chunker-params Override check of chunker parameters.
--sort Sort the output lines by file path.
2023-06-11 21:09:20 +00:00
--format FORMAT specify format for differences between archives (default: "{change} {path}{NL}")
2021-05-11 20:33:55 +00:00
--json-lines Format output as JSON Lines.
2023-06-11 21:09:20 +00:00
--content-only Only compare differences in content (exclude metadata differences)
2017-06-20 13:22:24 +00:00
:ref:`common_options`
|
2023-06-11 21:09:20 +00:00
Include/Exclude options
2017-06-20 13:22:24 +00:00
-e PATTERN, --exclude PATTERN exclude paths matching PATTERN
--exclude-from EXCLUDEFILE read exclude patterns from EXCLUDEFILE, one per line
2022-02-05 16:22:33 +00:00
--pattern PATTERN include/exclude paths matching PATTERN
--patterns-from PATTERNFILE read include/exclude patterns from PATTERNFILE, one per line
2017-06-20 09:49:26 +00:00
2017-03-26 23:45:45 +00:00
Description
~~~~~~~~~~~
2023-06-11 21:09:20 +00:00
This command finds differences (file contents, metadata) between ARCHIVE1 and ARCHIVE2.
2023-06-11 21:09:20 +00:00
For more help on include/exclude patterns, see the :ref:`borg_patterns` command output.
2023-06-11 21:09:20 +00:00
.. man NOTES
2023-06-11 21:09:20 +00:00
The FORMAT specifier syntax
+++++++++++++++++++++++++++
2016-03-18 11:17:57 +00:00
2023-06-11 21:09:20 +00:00
The ``--format`` option uses python's `format string syntax
<https://docs.python.org/3.9/library/string.html#formatstrings>`_.
Examples:
::
$ borg diff --format '{content:30} {path}{NL}' ArchiveFoo ArchiveBar
modified: +4.1 kB -1.0 kB file-diff
...
# {VAR:<NUMBER} - pad to NUMBER columns left-aligned.
# {VAR:>NUMBER} - pad to NUMBER columns right-aligned.
$ borg diff --format '{content:>30} {path}{NL}' ArchiveFoo ArchiveBar
modified: +4.1 kB -1.0 kB file-diff
...
The following keys are always available:
- NEWLINE: OS dependent line separator
- NL: alias of NEWLINE
- NUL: NUL character for creating print0 / xargs -0 like output
- SPACE: space character
- TAB: tab character
- CR: carriage return character
- LF: line feed character
Keys available only when showing differences between archives:
- path: archived file path
- change: all available changes
- content: file content change
- mode: file mode change
- type: file type change
- owner: file owner (user/group) change
- group: file group change
- user: file user change
- link: file link change
- directory: file directory change
- blkdev: file block device change
- chrdev: file character device change
- fifo: file fifo change
- mtime: file modification time change
- ctime: file change time change
- isomtime: file modification time change (ISO 8601)
- isoctime: file creation time change (ISO 8601)