Merge pull request #5194 from darkdragon-001/json-check

Json check
This commit is contained in:
Michael Eischer
2025-02-05 22:15:10 +01:00
committed by GitHub
7 changed files with 137 additions and 38 deletions

View File

@@ -245,6 +245,38 @@ are stored in JSON form. Specifying ``--json`` or ``--quiet`` will suppress any
non-JSON messages the command generates.
check
-----
The ``check`` command uses the JSON lines format with the following message types.
Status
^^^^^^
+--------------------------+------------------------------------------------------------------------------------------------+
| ``message_type`` | Always "summary" |
+--------------------------+------------------------------------------------------------------------------------------------+
| ``num_errors`` | Number of errors |
+--------------------------+------------------------------------------------------------------------------------------------+
| ``broken_packs`` | Run "restic repair packs ID..." and "restic repair snapshots --forget" to remove damaged files |
+--------------------------+------------------------------------------------------------------------------------------------+
| ``suggest_repair_index`` | Run "restic repair index" |
+--------------------------+------------------------------------------------------------------------------------------------+
| ``suggest_prune`` | Run "restic prune" |
+--------------------------+------------------------------------------------------------------------------------------------+
Error
^^^^^
These errors are printed on ``stderr``.
+----------------------+---------------------------------------------------------------------+
| ``message_type`` | Always "error" |
+----------------------+---------------------------------------------------------------------+
| ``message`` | Error message. May change in arbitrary ways across restic versions. |
+----------------------+---------------------------------------------------------------------+
diff
----