From 33de00bba083eeefaae931d7d4d6200c1a415baa Mon Sep 17 00:00:00 2001 From: Joram Berger Date: Sat, 6 Jul 2024 16:47:04 +0200 Subject: [PATCH 1/2] Add explanation to restic diff symbols Explain what the characters for each file in a restic diff output mean. --- doc/040_backup.rst | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/doc/040_backup.rst b/doc/040_backup.rst index 2aeb063d9..c068e0904 100644 --- a/doc/040_backup.rst +++ b/doc/040_backup.rst @@ -498,7 +498,7 @@ You can combine all three options with each other and with the normal file argum Comparing Snapshots ******************* -Restic has a `diff` command which shows the difference between two snapshots +Restic has a ``diff`` command which shows the difference between two snapshots and displays a small statistic, just pass the command two snapshot IDs: .. code-block:: console @@ -506,9 +506,9 @@ and displays a small statistic, just pass the command two snapshot IDs: $ restic -r /srv/restic-repo diff 5845b002 2ab627a6 comparing snapshot ea657ce5 to 2ab627a6: - C /restic/cmd_diff.go + M /restic/cmd_diff.go + /restic/foo - C /restic/restic + M /restic/restic Files: 0 new, 0 removed, 2 changed Dirs: 1 new, 0 removed @@ -527,6 +527,24 @@ folder, you could use the following command: $ restic -r /srv/restic-repo diff 5845b002:/restic 2ab627a6:/restic +By default, the ``diff`` command only lists differences in file contents. +The flag `--metadata` shows changes to file metadata, too. + +The characters left of the file path show what has changed for this file: + ++-------+-----------------------+ +| ``+`` | added | ++-------+-----------------------+ +| ``-`` | removed | ++-------+-----------------------+ +| ``T`` | entry type changed | ++-------+-----------------------+ +| ``M`` | file content changed | ++-------+-----------------------+ +| ``U`` | metadata changed | ++-------+-----------------------+ +| ``?`` | bitrot detected | ++-------+-----------------------+ Backing up special items and metadata ************************************* From 10765151d3145cceb5ed864f22616bfa68c4df92 Mon Sep 17 00:00:00 2001 From: Michael Eischer Date: Sat, 6 Jul 2024 21:01:58 +0200 Subject: [PATCH 2/2] doc: fine tune description of diff command --- doc/040_backup.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/040_backup.rst b/doc/040_backup.rst index c068e0904..77176b054 100644 --- a/doc/040_backup.rst +++ b/doc/040_backup.rst @@ -506,9 +506,9 @@ and displays a small statistic, just pass the command two snapshot IDs: $ restic -r /srv/restic-repo diff 5845b002 2ab627a6 comparing snapshot ea657ce5 to 2ab627a6: - M /restic/cmd_diff.go + M /restic/cmd_diff.go + /restic/foo - M /restic/restic + M /restic/restic Files: 0 new, 0 removed, 2 changed Dirs: 1 new, 0 removed @@ -528,7 +528,7 @@ folder, you could use the following command: $ restic -r /srv/restic-repo diff 5845b002:/restic 2ab627a6:/restic By default, the ``diff`` command only lists differences in file contents. -The flag `--metadata` shows changes to file metadata, too. +The flag ``--metadata`` shows changes to file metadata, too. The characters left of the file path show what has changed for this file: