ls: include standard message_type field in output

This commit is contained in:
Michael Eischer
2024-01-27 15:48:24 +01:00
parent e44e4b00a6
commit 5dca8a70d5
5 changed files with 81 additions and 74 deletions

View File

@@ -75,9 +75,6 @@ Several commands, in particular long running ones or those that generate a large
use a format also known as JSON lines. It consists of a stream of new-line separated JSON
messages. You can determine the nature of the message using the ``message_type`` field.
As an exception, the ``ls`` command uses the field ``struct_type`` instead.
backup
------
@@ -420,63 +417,67 @@ As an exception, the ``struct_type`` field is used to determine the message type
snapshot
^^^^^^^^
+----------------+--------------------------------------------------+
| ``struct_type``| Always "snapshot" |
+----------------+--------------------------------------------------+
| ``time`` | Timestamp of when the backup was started |
+----------------+--------------------------------------------------+
| ``parent`` | ID of the parent snapshot |
+----------------+--------------------------------------------------+
| ``tree`` | ID of the root tree blob |
+----------------+--------------------------------------------------+
| ``paths`` | List of paths included in the backup |
+----------------+--------------------------------------------------+
| ``hostname`` | Hostname of the backed up machine |
+----------------+--------------------------------------------------+
| ``username`` | Username the backup command was run as |
+----------------+--------------------------------------------------+
| ``uid`` | ID of owner |
+----------------+--------------------------------------------------+
| ``gid`` | ID of group |
+----------------+--------------------------------------------------+
| ``excludes`` | List of paths and globs excluded from the backup |
+----------------+--------------------------------------------------+
| ``tags`` | List of tags for the snapshot in question |
+----------------+--------------------------------------------------+
| ``id`` | Snapshot ID |
+----------------+--------------------------------------------------+
| ``short_id`` | Snapshot ID, short form |
+----------------+--------------------------------------------------+
+------------------+--------------------------------------------------+
| ``message_type`` | Always "snapshot" |
+------------------+--------------------------------------------------+
| ``struct_type`` | Always "snapshot" (deprecated) |
+------------------+--------------------------------------------------+
| ``time`` | Timestamp of when the backup was started |
+------------------+--------------------------------------------------+
| ``parent`` | ID of the parent snapshot |
+------------------+--------------------------------------------------+
| ``tree`` | ID of the root tree blob |
+------------------+--------------------------------------------------+
| ``paths`` | List of paths included in the backup |
+------------------+--------------------------------------------------+
| ``hostname`` | Hostname of the backed up machine |
+------------------+--------------------------------------------------+
| ``username`` | Username the backup command was run as |
+------------------+--------------------------------------------------+
| ``uid`` | ID of owner |
+------------------+--------------------------------------------------+
| ``gid`` | ID of group |
+------------------+--------------------------------------------------+
| ``excludes`` | List of paths and globs excluded from the backup |
+------------------+--------------------------------------------------+
| ``tags`` | List of tags for the snapshot in question |
+------------------+--------------------------------------------------+
| ``id`` | Snapshot ID |
+------------------+--------------------------------------------------+
| ``short_id`` | Snapshot ID, short form |
+------------------+--------------------------------------------------+
node
^^^^
+-----------------+--------------------------+
| ``struct_type`` | Always "node" |
+-----------------+--------------------------+
| ``name`` | Node name |
+-----------------+--------------------------+
| ``type`` | Node type |
+-----------------+--------------------------+
| ``path`` | Node path |
+-----------------+--------------------------+
| ``uid`` | UID of node |
+-----------------+--------------------------+
| ``gid`` | GID of node |
+-----------------+--------------------------+
| ``size`` | Size in bytes |
+-----------------+--------------------------+
| ``mode`` | Node mode |
+-----------------+--------------------------+
| ``atime`` | Node access time |
+-----------------+--------------------------+
| ``mtime`` | Node modification time |
+-----------------+--------------------------+
| ``ctime`` | Node creation time |
+-----------------+--------------------------+
| ``inode`` | Inode number of node |
+-----------------+--------------------------+
+------------------+----------------------------+
| ``message_type`` | Always "node" |
+------------------+----------------------------+
| ``struct_type`` | Always "node" (deprecated) |
+------------------+----------------------------+
| ``name`` | Node name |
+------------------+----------------------------+
| ``type`` | Node type |
+------------------+----------------------------+
| ``path`` | Node path |
+------------------+----------------------------+
| ``uid`` | UID of node |
+------------------+----------------------------+
| ``gid`` | GID of node |
+------------------+----------------------------+
| ``size`` | Size in bytes |
+------------------+----------------------------+
| ``mode`` | Node mode |
+------------------+----------------------------+
| ``atime`` | Node access time |
+------------------+----------------------------+
| ``mtime`` | Node modification time |
+------------------+----------------------------+
| ``ctime`` | Node creation time |
+------------------+----------------------------+
| ``inode`` | Inode number of node |
+------------------+----------------------------+
restore