Add check summary

This commit is contained in:
Dark Dragon
2024-12-30 23:44:46 +01:00
parent a58a8f2ce0
commit 7cc1aa0cd4
2 changed files with 55 additions and 30 deletions

View File

@@ -248,13 +248,33 @@ non-JSON messages the command generates.
check
-----
The ``check`` command outputs JSON messages with the following format:
The ``check`` command uses the JSON lines format with the following message types.
+------------------+--------------------------------+
| ``message_type`` | Either "checked" or "error" |
+------------------+--------------------------------+
| ``message`` | Descriptive message |
+------------------+--------------------------------+
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