From 421842f41ffe7c13b327a99ba0be20094c19a0cc Mon Sep 17 00:00:00 2001 From: Michael Eischer Date: Thu, 6 Feb 2025 20:10:42 +0100 Subject: [PATCH] doc: add datatypes to JSON outputs --- doc/075_scripting.rst | 980 ++++++++++++++++++++++-------------------- 1 file changed, 502 insertions(+), 478 deletions(-) diff --git a/doc/075_scripting.rst b/doc/075_scripting.rst index 9541accb1..6df3ac98b 100644 --- a/doc/075_scripting.rst +++ b/doc/075_scripting.rst @@ -1,6 +1,6 @@ .. Normally, there are no heading levels assigned to certain characters as the structure is - determined from the succession of headings. However, this convention is used in Python’s + determined from the succession of headings. However, this convention is used in Python's Style Guide for documenting which you may follow: # with overline, for parts @@ -97,13 +97,13 @@ It will hold the error message and the exit code. Some errors cannot be caught and reported this way, such as Go runtime errors or command line parsing errors. -+------------------+-----------------------------+ -| ``message_type`` | Always "exit_error" | -+------------------+-----------------------------+ -| ``code`` | Exit code (see above chart) | -+------------------+-----------------------------+ -| ``message`` | Error message | -+------------------+-----------------------------+ ++------------------+-----------------------------+--------+ +| ``message_type`` | Always "exit_error" | string | ++------------------+-----------------------------+--------+ +| ``code`` | Exit code (see above chart) | int | ++------------------+-----------------------------+--------+ +| ``message`` | Error message | string | ++------------------+-----------------------------+--------+ Output formats -------------- @@ -115,6 +115,18 @@ The generated JSON output uses one of the following two formats. Not all messages and errors have been converted to JSON yet. Feel free to submit a pull request! +The datatypes specified in the following sections roughly correspond to the underlying +Go types and are mapped to the JSON types as follows: + +- ``int32``, ``int64``, ``uint32``, ``uint64`` and ``float64`` are encoded as number. +- ``bool`` and ``string`` correspond to the respective types. +- ``[]`` in front of a type indicates that the field is an array of the respective type. +- ``time.Time`` is encoded as a string in RFC3339 format. +- ``time.Duration`` is encoded as an ``int64`` number of nanoseconds. +- ``os.FileMode`` is encoded as an ``uint32``. + +If a field contains a default value like ``0`` or ``""``, may not be included in the JSON output. + Single JSON document ^^^^^^^^^^^^^^^^^^^^ @@ -136,105 +148,105 @@ The ``backup`` command uses the JSON lines format with the following message typ Status ^^^^^^ -+-----------------------+-------------------------------------------------------+ -| ``message_type`` | Always "status" | -+-----------------------+-------------------------------------------------------+ -| ``seconds_elapsed`` | Time since backup started | -+-----------------------+-------------------------------------------------------+ -| ``seconds_remaining`` | Estimated time remaining | -+-----------------------+-------------------------------------------------------+ -| ``percent_done`` | Percentage of data backed up (bytes_done/total_bytes) | -+-----------------------+-------------------------------------------------------+ -| ``total_files`` | Total number of files detected | -+-----------------------+-------------------------------------------------------+ -| ``files_done`` | Files completed (backed up to repo) | -+-----------------------+-------------------------------------------------------+ -| ``total_bytes`` | Total number of bytes in backup set | -+-----------------------+-------------------------------------------------------+ -| ``bytes_done`` | Number of bytes completed (backed up to repo) | -+-----------------------+-------------------------------------------------------+ -| ``error_count`` | Number of errors | -+-----------------------+-------------------------------------------------------+ -| ``current_files`` | List of files currently being backed up | -+-----------------------+-------------------------------------------------------+ ++-----------------------+-------------------------------------------------------+----------+ +| ``message_type`` | Always "status" | string | ++-----------------------+-------------------------------------------------------+----------+ +| ``seconds_elapsed`` | Time since backup started | uint64 | ++-----------------------+-------------------------------------------------------+----------+ +| ``seconds_remaining`` | Estimated time remaining | uint64 | ++-----------------------+-------------------------------------------------------+----------+ +| ``percent_done`` | Percentage of data backed up (bytes_done/total_bytes) | float64 | ++-----------------------+-------------------------------------------------------+----------+ +| ``total_files`` | Total number of files detected | uint64 | ++-----------------------+-------------------------------------------------------+----------+ +| ``files_done`` | Files completed (backed up to repo) | uint64 | ++-----------------------+-------------------------------------------------------+----------+ +| ``total_bytes`` | Total number of bytes in backup set | uint64 | ++-----------------------+-------------------------------------------------------+----------+ +| ``bytes_done`` | Number of bytes completed (backed up to repo) | uint64 | ++-----------------------+-------------------------------------------------------+----------+ +| ``error_count`` | Number of errors | uint64 | ++-----------------------+-------------------------------------------------------+----------+ +| ``current_files`` | List of files currently being backed up | []string | ++-----------------------+-------------------------------------------------------+----------+ Error ^^^^^ These errors are printed on ``stderr``. -+-------------------+-------------------------------------------+ -| ``message_type`` | Always "error" | -+-------------------+-------------------------------------------+ -| ``error.message`` | Error message | -+-------------------+-------------------------------------------+ -| ``during`` | What restic was trying to do | -+-------------------+-------------------------------------------+ -| ``item`` | Usually, the path of the problematic file | -+-------------------+-------------------------------------------+ ++-------------------+-------------------------------------------+--------+ +| ``message_type`` | Always "error" | string | ++-------------------+-------------------------------------------+--------+ +| ``error.message`` | Error message | string | ++-------------------+-------------------------------------------+--------+ +| ``during`` | What restic was trying to do | string | ++-------------------+-------------------------------------------+--------+ +| ``item`` | Usually, the path of the problematic file | string | ++-------------------+-------------------------------------------+--------+ Verbose Status ^^^^^^^^^^^^^^ Verbose status provides details about the progress, including details about backed up files. -+-------------------+----------------------------------------------------------+ -| ``message_type`` | Always "verbose_status" | -+-------------------+----------------------------------------------------------+ -| ``action`` | Either "new", "unchanged", "modified" or "scan_finished" | -+-------------------+----------------------------------------------------------+ -| ``item`` | The item in question | -+-------------------+----------------------------------------------------------+ -| ``duration`` | How long it took, in seconds | -+-------------------+----------------------------------------------------------+ -| ``data_size`` | How big the item is | -+-------------------+----------------------------------------------------------+ -| ``metadata_size`` | How big the metadata is | -+-------------------+----------------------------------------------------------+ -| ``total_files`` | Total number of files | -+-------------------+----------------------------------------------------------+ ++-------------------+----------------------------------------------------------+---------+ +| ``message_type`` | Always "verbose_status" | string | ++-------------------+----------------------------------------------------------+---------+ +| ``action`` | Either "new", "unchanged", "modified" or "scan_finished" | string | ++-------------------+----------------------------------------------------------+---------+ +| ``item`` | The item in question | string | ++-------------------+----------------------------------------------------------+---------+ +| ``duration`` | How long it took, in seconds | float64 | ++-------------------+----------------------------------------------------------+---------+ +| ``data_size`` | How big the item is | uint64 | ++-------------------+----------------------------------------------------------+---------+ +| ``metadata_size`` | How big the metadata is | uint64 | ++-------------------+----------------------------------------------------------+---------+ +| ``total_files`` | Total number of files | uint64 | ++-------------------+----------------------------------------------------------+---------+ Summary ^^^^^^^ Summary is the last output line in a successful backup. -+---------------------------+------------------------------------------------------+ -| ``message_type`` | Always "summary" | -+---------------------------+------------------------------------------------------+ -| ``files_new`` | Number of new files | -+---------------------------+------------------------------------------------------+ -| ``files_changed`` | Number of files that changed | -+---------------------------+------------------------------------------------------+ -| ``files_unmodified`` | Number of files that did not change | -+---------------------------+------------------------------------------------------+ -| ``dirs_new`` | Number of new directories | -+---------------------------+------------------------------------------------------+ -| ``dirs_changed`` | Number of directories that changed | -+---------------------------+------------------------------------------------------+ -| ``dirs_unmodified`` | Number of directories that did not change | -+---------------------------+------------------------------------------------------+ -| ``data_blobs`` | Number of data blobs added | -+---------------------------+------------------------------------------------------+ -| ``tree_blobs`` | Number of tree blobs added | -+---------------------------+------------------------------------------------------+ -| ``data_added`` | Amount of (uncompressed) data added, in bytes | -+---------------------------+------------------------------------------------------+ -| ``data_added_packed`` | Amount of data added (after compression), in bytes | -+---------------------------+------------------------------------------------------+ -| ``total_files_processed`` | Total number of files processed | -+---------------------------+------------------------------------------------------+ -| ``total_bytes_processed`` | Total number of bytes processed | -+---------------------------+------------------------------------------------------+ -| ``backup_start`` | Time at which the backup was started | -+---------------------------+------------------------------------------------------+ -| ``backup_end`` | Time at which the backup was completed | -+---------------------------+------------------------------------------------------+ -| ``total_duration`` | Total time it took for the operation to complete | -+---------------------------+------------------------------------------------------+ -| ``snapshot_id`` | ID of the new snapshot. Field is omitted if snapshot | -| | creation was skipped | -+---------------------------+------------------------------------------------------+ ++---------------------------+------------------------------------------------------+---------------+ +| ``message_type`` | Always "summary" | string | ++---------------------------+------------------------------------------------------+---------------+ +| ``files_new`` | Number of new files | uint64 | ++---------------------------+------------------------------------------------------+---------------+ +| ``files_changed`` | Number of files that changed | uint64 | ++---------------------------+------------------------------------------------------+---------------+ +| ``files_unmodified`` | Number of files that did not change | uint64 | ++---------------------------+------------------------------------------------------+---------------+ +| ``dirs_new`` | Number of new directories | uint64 | ++---------------------------+------------------------------------------------------+---------------+ +| ``dirs_changed`` | Number of directories that changed | uint64 | ++---------------------------+------------------------------------------------------+---------------+ +| ``dirs_unmodified`` | Number of directories that did not change | uint64 | ++---------------------------+------------------------------------------------------+---------------+ +| ``data_blobs`` | Number of data blobs added | int64 | ++---------------------------+------------------------------------------------------+---------------+ +| ``tree_blobs`` | Number of tree blobs added | int64 | ++---------------------------+------------------------------------------------------+---------------+ +| ``data_added`` | Amount of (uncompressed) data added, in bytes | uint64 | ++---------------------------+------------------------------------------------------+---------------+ +| ``data_added_packed`` | Amount of data added (after compression), in bytes | uint64 | ++---------------------------+------------------------------------------------------+---------------+ +| ``total_files_processed`` | Total number of files processed | uint64 | ++---------------------------+------------------------------------------------------+---------------+ +| ``total_bytes_processed`` | Total number of bytes processed | uint64 | ++---------------------------+------------------------------------------------------+---------------+ +| ``backup_start`` | Time at which the backup was started | time.Time | ++---------------------------+------------------------------------------------------+---------------+ +| ``backup_end`` | Time at which the backup was completed | time.Time | ++---------------------------+------------------------------------------------------+---------------+ +| ``total_duration`` | Total time it took for the operation to complete | time.Duration | ++---------------------------+------------------------------------------------------+---------------+ +| ``snapshot_id`` | ID of the new snapshot. Field is omitted if snapshot | string | +| | creation was skipped | | ++---------------------------+------------------------------------------------------+---------------+ cat @@ -253,28 +265,28 @@ The ``check`` command uses the JSON lines format with the following message type 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" | -+--------------------------+------------------------------------------------------------------------------------------------+ ++--------------------------+------------------------------------------------------------------------------------------------+----------+ +| ``message_type`` | Always "summary" | string | ++--------------------------+------------------------------------------------------------------------------------------------+----------+ +| ``num_errors`` | Number of errors | int64 | ++--------------------------+------------------------------------------------------------------------------------------------+----------+ +| ``broken_packs`` | Run "restic repair packs ID..." and "restic repair snapshots --forget" to remove damaged files | []string | ++--------------------------+------------------------------------------------------------------------------------------------+----------+ +| ``suggest_repair_index`` | Run "restic repair index" | bool | ++--------------------------+------------------------------------------------------------------------------------------------+----------+ +| ``suggest_prune`` | Run "restic prune" | bool | ++--------------------------+------------------------------------------------------------------------------------------------+----------+ Error ^^^^^ These errors are printed on ``stderr``. -+------------------+---------------------------------------------------------------------+ -| ``message_type`` | Always "error" | -+------------------+---------------------------------------------------------------------+ -| ``message`` | Error message. May change in arbitrary ways across restic versions. | -+------------------+---------------------------------------------------------------------+ ++------------------+---------------------------------------------------------------------+--------+ +| ``message_type`` | Always "error" | string | ++------------------+---------------------------------------------------------------------+--------+ +| ``message`` | Error message. May change in arbitrary ways across restic versions. | string | ++------------------+---------------------------------------------------------------------+--------+ diff @@ -285,49 +297,51 @@ The ``diff`` command uses the JSON lines format with the following message types change ^^^^^^ -+------------------+--------------------------------------------------------------+ -| ``message_type`` | Always "change" | -+------------------+--------------------------------------------------------------+ -| ``path`` | Path that has changed | -+------------------+--------------------------------------------------------------+ -| ``modifier`` | Type of change, a concatenation of the following characters: | -| | "+" = added, "-" = removed, "T" = entry type changed, | -| | "M" = file content changed, "U" = metadata changed, | -| | "?" = bitrot detected | -+------------------+--------------------------------------------------------------+ ++------------------+--------------------------------------------------------------+--------+ +| ``message_type`` | Always "change" | string | ++------------------+--------------------------------------------------------------+--------+ +| ``path`` | Path that has changed | string | ++------------------+--------------------------------------------------------------+--------+ +| ``modifier`` | Type of change, a concatenation of the following characters: | string | +| | "+" = added, "-" = removed, "T" = entry type changed, | | +| | "M" = file content changed, "U" = metadata changed, | | +| | "?" = bitrot detected | | ++------------------+--------------------------------------------------------------+--------+ statistics ^^^^^^^^^^ -+---------------------+----------------------------+ -| ``message_type`` | Always "statistics" | -+---------------------+----------------------------+ -| ``source_snapshot`` | ID of first snapshot | -+---------------------+----------------------------+ -| ``target_snapshot`` | ID of second snapshot | -+---------------------+----------------------------+ -| ``changed_files`` | Number of changed files | -+---------------------+----------------------------+ -| ``added`` | DiffStat object, see below | -+---------------------+----------------------------+ -| ``removed`` | DiffStat object, see below | -+---------------------+----------------------------+ ++---------------------+-------------------------+--------------------+ +| ``message_type`` | Always "statistics" | string | ++---------------------+-------------------------+--------------------+ +| ``source_snapshot`` | ID of first snapshot | string | ++---------------------+-------------------------+--------------------+ +| ``target_snapshot`` | ID of second snapshot | string | ++---------------------+-------------------------+--------------------+ +| ``changed_files`` | Number of changed files | int64 | ++---------------------+-------------------------+--------------------+ +| ``added`` | Added items | `DiffStat object`_ | ++---------------------+-------------------------+--------------------+ +| ``removed`` | Removed items | `DiffStat object`_ | ++---------------------+-------------------------+--------------------+ + +.. _DiffStat object: DiffStat object -+----------------+-------------------------------------------+ -| ``files`` | Number of changed files | -+----------------+-------------------------------------------+ -| ``dirs`` | Number of changed directories | -+----------------+-------------------------------------------+ -| ``others`` | Number of changed other directory entries | -+----------------+-------------------------------------------+ -| ``data_blobs`` | Number of data blobs | -+----------------+-------------------------------------------+ -| ``tree_blobs`` | Number of tree blobs | -+----------------+-------------------------------------------+ -| ``bytes`` | Number of bytes | -+----------------+-------------------------------------------+ ++----------------+-------------------------------------------+--------+ +| ``files`` | Number of changed files | int64 | ++----------------+-------------------------------------------+--------+ +| ``dirs`` | Number of changed directories | int64 | ++----------------+-------------------------------------------+--------+ +| ``others`` | Number of changed other directory entries | int64 | ++----------------+-------------------------------------------+--------+ +| ``data_blobs`` | Number of data blobs | int64 | ++----------------+-------------------------------------------+--------+ +| ``tree_blobs`` | Number of tree blobs | int64 | ++----------------+-------------------------------------------+--------+ +| ``bytes`` | Number of bytes | uint64 | ++----------------+-------------------------------------------+--------+ find @@ -337,68 +351,72 @@ The ``find`` command outputs a single JSON document containing an array of JSON objects with matches for your search term. These matches are organized by snapshot. If the ``--blob`` or ``--tree`` option is passed, then the output is an array of -Blob objects. +`Blob objects`_. -+--------------+------------------------------------------+ -| ``hits`` | Number of matches in the snapshot | -+--------------+------------------------------------------+ -| ``snapshot`` | ID of the snapshot | -+--------------+------------------------------------------+ -| ``matches`` | Array of Match objects detailing a match | -+--------------+------------------------------------------+ ++--------------+-----------------------------------+-------------------+ +| ``hits`` | Number of matches in the snapshot | uint64 | ++--------------+-----------------------------------+-------------------+ +| ``snapshot`` | ID of the snapshot | string | ++--------------+-----------------------------------+-------------------+ +| ``matches`` | Details of a match | []`Match object`_ | ++--------------+-----------------------------------+-------------------+ + +.. _Match object: Match object -+-----------------+----------------------------------------------+ -| ``path`` | Object path | -+-----------------+----------------------------------------------+ -| ``permissions`` | UNIX permissions | -+-----------------+----------------------------------------------+ -| ``type`` | Object type e.g. file, dir, etc... | -+-----------------+----------------------------------------------+ -| ``atime`` | Access time | -+-----------------+----------------------------------------------+ -| ``mtime`` | Modification time | -+-----------------+----------------------------------------------+ -| ``ctime`` | Change time | -+-----------------+----------------------------------------------+ -| ``name`` | Object name | -+-----------------+----------------------------------------------+ -| ``user`` | Name of owner | -+-----------------+----------------------------------------------+ -| ``group`` | Name of group | -+-----------------+----------------------------------------------+ -| ``inode`` | Inode number | -+-----------------+----------------------------------------------+ -| ``mode`` | UNIX file mode, shorthand of ``permissions`` | -+-----------------+----------------------------------------------+ -| ``device_id`` | OS specific device identifier | -+-----------------+----------------------------------------------+ -| ``links`` | Number of hardlinks | -+-----------------+----------------------------------------------+ -| ``uid`` | ID of owner | -+-----------------+----------------------------------------------+ -| ``gid`` | ID of group | -+-----------------+----------------------------------------------+ -| ``size`` | Size of object in bytes | -+-----------------+----------------------------------------------+ ++-----------------+----------------------------------------------+-------------+ +| ``path`` | Object path | string | ++-----------------+----------------------------------------------+-------------+ +| ``permissions`` | UNIX permissions | string | ++-----------------+----------------------------------------------+-------------+ +| ``type`` | Object type e.g. file, dir, etc... | string | ++-----------------+----------------------------------------------+-------------+ +| ``atime`` | Access time | time.Time | ++-----------------+----------------------------------------------+-------------+ +| ``mtime`` | Modification time | time.Time | ++-----------------+----------------------------------------------+-------------+ +| ``ctime`` | Change time | time.Time | ++-----------------+----------------------------------------------+-------------+ +| ``name`` | Object name | string | ++-----------------+----------------------------------------------+-------------+ +| ``user`` | Name of owner | string | ++-----------------+----------------------------------------------+-------------+ +| ``group`` | Name of group | string | ++-----------------+----------------------------------------------+-------------+ +| ``inode`` | Inode number | uint64 | ++-----------------+----------------------------------------------+-------------+ +| ``mode`` | UNIX file mode, shorthand of ``permissions`` | os.FileMode | ++-----------------+----------------------------------------------+-------------+ +| ``device_id`` | OS specific device identifier | uint64 | ++-----------------+----------------------------------------------+-------------+ +| ``links`` | Number of hardlinks | uint64 | ++-----------------+----------------------------------------------+-------------+ +| ``uid`` | ID of owner | uint32 | ++-----------------+----------------------------------------------+-------------+ +| ``gid`` | ID of group | uint32 | ++-----------------+----------------------------------------------+-------------+ +| ``size`` | Size of object in bytes | uint64 | ++-----------------+----------------------------------------------+-------------+ -Blob object +.. _Blob objects: -+-----------------+--------------------------------------------+ -| ``object_type`` | Either "blob" or "tree" | -+-----------------+--------------------------------------------+ -| ``id`` | ID of found blob | -+-----------------+--------------------------------------------+ -| ``path`` | Path in snapshot | -+-----------------+--------------------------------------------+ -| ``parent_tree`` | Parent tree blob, only set for type "blob" | -+-----------------+--------------------------------------------+ -| ``snapshot`` | Snapshot ID | -+-----------------+--------------------------------------------+ -| ``time`` | Snapshot timestamp | -+-----------------+--------------------------------------------+ +Blob objects + ++-----------------+--------------------------------------------+-----------+ +| ``object_type`` | Either "blob" or "tree" | string | ++-----------------+--------------------------------------------+-----------+ +| ``id`` | ID of found blob | string | ++-----------------+--------------------------------------------+-----------+ +| ``path`` | Path in snapshot | string | ++-----------------+--------------------------------------------+-----------+ +| ``parent_tree`` | Parent tree blob, only set for type "blob" | string | ++-----------------+--------------------------------------------+-----------+ +| ``snapshot`` | Snapshot ID | string | ++-----------------+--------------------------------------------+-----------+ +| ``time`` | Snapshot timestamp | time.Time | ++-----------------+--------------------------------------------+-----------+ forget @@ -413,59 +431,63 @@ results in a mix of JSON and text output. ForgetGroup ^^^^^^^^^^^ -+-------------+-----------------------------------------------------------+ -| ``tags`` | Tags identifying the snapshot group | -+-------------+-----------------------------------------------------------+ -| ``host`` | Host identifying the snapshot group | -+-------------+-----------------------------------------------------------+ -| ``paths`` | Paths identifying the snapshot group | -+-------------+-----------------------------------------------------------+ -| ``keep`` | Array of Snapshot objects that are kept | -+-------------+-----------------------------------------------------------+ -| ``remove`` | Array of Snapshot objects that were removed | -+-------------+-----------------------------------------------------------+ -| ``reasons`` | Array of Reason objects describing why a snapshot is kept | -+-------------+-----------------------------------------------------------+ ++-------------+---------------------------------------------------------------+------------------------+ +| ``tags`` | Tags identifying the snapshot group | []string | ++-------------+---------------------------------------------------------------+------------------------+ +| ``host`` | Host identifying the snapshot group | string | ++-------------+---------------------------------------------------------------+------------------------+ +| ``paths`` | Paths identifying the snapshot group | []string | ++-------------+---------------------------------------------------------------+------------------------+ +| ``keep`` | Array of Snapshot that are kept | []`Snapshot object`_ | ++-------------+---------------------------------------------------------------+------------------------+ +| ``remove`` | Array of Snapshot that were removed | []`Snapshot object`_ | ++-------------+---------------------------------------------------------------+------------------------+ +| ``reasons`` | Array of KeepReason objects describing why a snapshot is kept | []`KeepReason object`_ | ++-------------+---------------------------------------------------------------+------------------------+ + +.. _Snapshot object: Snapshot object -+---------------------+--------------------------------------------------+ -| ``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 | -+---------------------+--------------------------------------------------+ -| ``program_version`` | restic version used to create snapshot | -+---------------------+--------------------------------------------------+ -| ``id`` | Snapshot ID | -+---------------------+--------------------------------------------------+ -| ``short_id`` | Snapshot ID, short form | -+---------------------+--------------------------------------------------+ ++---------------------+--------------------------------------------------+-----------+ +| ``time`` | Timestamp of when the backup was started | time.Time | ++---------------------+--------------------------------------------------+-----------+ +| ``parent`` | ID of the parent snapshot | string | ++---------------------+--------------------------------------------------+-----------+ +| ``tree`` | ID of the root tree blob | string | ++---------------------+--------------------------------------------------+-----------+ +| ``paths`` | List of paths included in the backup | []string | ++---------------------+--------------------------------------------------+-----------+ +| ``hostname`` | Hostname of the backed up machine | string | ++---------------------+--------------------------------------------------+-----------+ +| ``username`` | Username the backup command was run as | string | ++---------------------+--------------------------------------------------+-----------+ +| ``uid`` | ID of owner | uint32 | ++---------------------+--------------------------------------------------+-----------+ +| ``gid`` | ID of group | uint32 | ++---------------------+--------------------------------------------------+-----------+ +| ``excludes`` | List of paths and globs excluded from the backup | []string | ++---------------------+--------------------------------------------------+-----------+ +| ``tags`` | List of tags for the snapshot in question | []string | ++---------------------+--------------------------------------------------+-----------+ +| ``program_version`` | restic version used to create snapshot | string | ++---------------------+--------------------------------------------------+-----------+ +| ``id`` | Snapshot ID | string | ++---------------------+--------------------------------------------------+-----------+ +| ``short_id`` | Snapshot ID, short form | string | ++---------------------+--------------------------------------------------+-----------+ -Reason object +.. _KeepReason object: -+--------------+-----------------------------------------------------------+ -| ``snapshot`` | Snapshot object, including ``id`` and ``short_id`` fields | -+--------------+-----------------------------------------------------------+ -| ``matches`` | Array containing descriptions of the matching criteria | -+--------------+-----------------------------------------------------------+ -| ``counters`` | Object containing counters used by the policies | -+--------------+-----------------------------------------------------------+ +KeepReason object + ++--------------+--------------------------------------------------------+--------------------+ +| ``snapshot`` | Snapshot described by this object | `Snapshot object`_ | ++--------------+--------------------------------------------------------+--------------------+ +| ``matches`` | Array containing descriptions of the matching criteria | []string | ++--------------+--------------------------------------------------------+--------------------+ +| ``counters`` | Object containing counters used by the policies | object | ++--------------+--------------------------------------------------------+--------------------+ init @@ -473,13 +495,13 @@ init The ``init`` command uses the JSON lines format, but only outputs a single message. -+------------------+------------------------------+ -| ``message_type`` | Always "initialized" | -+------------------+------------------------------+ -| ``id`` | ID of the created repository | -+------------------+------------------------------+ -| ``repository`` | URL of the repository | -+------------------+------------------------------+ ++------------------+------------------------------+--------+ +| ``message_type`` | Always "initialized" | string | ++------------------+------------------------------+--------+ +| ``id`` | ID of the created repository | string | ++------------------+------------------------------+--------+ +| ``repository`` | URL of the repository | string | ++------------------+------------------------------+--------+ key list @@ -487,17 +509,17 @@ key list The ``key list`` command returns an array of objects with the following structure. -+--------------+-----------------------------------+ -| ``current`` | Is currently used key? | -+--------------+-----------------------------------+ -| ``id`` | Unique key ID | -+--------------+-----------------------------------+ -| ``userName`` | User who created it | -+--------------+-----------------------------------+ -| ``hostName`` | Name of machine it was created on | -+--------------+-----------------------------------+ -| ``created`` | Timestamp when it was created | -+--------------+-----------------------------------+ ++--------------+-----------------------------------+-----------------+ +| ``current`` | Is currently used key? | bool | ++--------------+-----------------------------------+-----------------+ +| ``id`` | Unique key ID | string | ++--------------+-----------------------------------+-----------------+ +| ``userName`` | User who created it | string | ++--------------+-----------------------------------+-----------------+ +| ``hostName`` | Name of machine it was created on | string | ++--------------+-----------------------------------+-----------------+ +| ``created`` | Timestamp when it was created | local time.Time | ++--------------+-----------------------------------+-----------------+ .. _ls json: @@ -511,67 +533,67 @@ As an exception, the ``struct_type`` field is used to determine the message type snapshot ^^^^^^^^ -+------------------+--------------------------------------------------+ -| ``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 | -+------------------+--------------------------------------------------+ ++------------------+--------------------------------------------------+-----------+ +| ``message_type`` | Always "snapshot" | string | ++------------------+--------------------------------------------------+-----------+ +| ``struct_type`` | Always "snapshot" (deprecated) | string | ++------------------+--------------------------------------------------+-----------+ +| ``time`` | Timestamp of when the backup was started | time.Time | ++------------------+--------------------------------------------------+-----------+ +| ``parent`` | ID of the parent snapshot | string | ++------------------+--------------------------------------------------+-----------+ +| ``tree`` | ID of the root tree blob | string | ++------------------+--------------------------------------------------+-----------+ +| ``paths`` | List of paths included in the backup | []string | ++------------------+--------------------------------------------------+-----------+ +| ``hostname`` | Hostname of the backed up machine | string | ++------------------+--------------------------------------------------+-----------+ +| ``username`` | Username the backup command was run as | string | ++------------------+--------------------------------------------------+-----------+ +| ``uid`` | ID of owner | uint32 | ++------------------+--------------------------------------------------+-----------+ +| ``gid`` | ID of group | uint32 | ++------------------+--------------------------------------------------+-----------+ +| ``excludes`` | List of paths and globs excluded from the backup | []string | ++------------------+--------------------------------------------------+-----------+ +| ``tags`` | List of tags for the snapshot in question | []string | ++------------------+--------------------------------------------------+-----------+ +| ``id`` | Snapshot ID | string | ++------------------+--------------------------------------------------+-----------+ +| ``short_id`` | Snapshot ID, short form | string | ++------------------+--------------------------------------------------+-----------+ 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 | -+------------------+----------------------------+ ++------------------+----------------------------+-------------+ +| ``message_type`` | Always "node" | string | ++------------------+----------------------------+-------------+ +| ``struct_type`` | Always "node" (deprecated) | string | ++------------------+----------------------------+-------------+ +| ``name`` | Node name | string | ++------------------+----------------------------+-------------+ +| ``type`` | Node type | string | ++------------------+----------------------------+-------------+ +| ``path`` | Node path | string | ++------------------+----------------------------+-------------+ +| ``uid`` | UID of node | uint32 | ++------------------+----------------------------+-------------+ +| ``gid`` | GID of node | uint32 | ++------------------+----------------------------+-------------+ +| ``size`` | Size in bytes | uint64 | ++------------------+----------------------------+-------------+ +| ``mode`` | Node mode | os.FileMode | ++------------------+----------------------------+-------------+ +| ``atime`` | Node access time | time.Time | ++------------------+----------------------------+-------------+ +| ``mtime`` | Node modification time | time.Time | ++------------------+----------------------------+-------------+ +| ``ctime`` | Node creation time | time.Time | ++------------------+----------------------------+-------------+ +| ``inode`` | Inode number of node | uint64 | ++------------------+----------------------------+-------------+ restore @@ -582,42 +604,42 @@ The ``restore`` command uses the JSON lines format with the following message ty Status ^^^^^^ -+---------------------+----------------------------------------------------------+ -| ``message_type`` | Always "status" | -+---------------------+----------------------------------------------------------+ -| ``seconds_elapsed`` | Time since restore started | -+---------------------+----------------------------------------------------------+ -| ``percent_done`` | Percentage of data restored (bytes_restored/total_bytes) | -+---------------------+----------------------------------------------------------+ -| ``total_files`` | Total number of files detected | -+---------------------+----------------------------------------------------------+ -| ``files_restored`` | Files restored | -+---------------------+----------------------------------------------------------+ -| ``files_skipped`` | Files skipped due to overwrite setting | -+---------------------+----------------------------------------------------------+ -| ``files_deleted`` | Files deleted | -+---------------------+----------------------------------------------------------+ -| ``total_bytes`` | Total number of bytes in restore set | -+---------------------+----------------------------------------------------------+ -| ``bytes_restored`` | Number of bytes restored | -+---------------------+----------------------------------------------------------+ -| ``bytes_skipped`` | Total size of skipped files | -+---------------------+----------------------------------------------------------+ ++---------------------+----------------------------------------------------------+---------+ +| ``message_type`` | Always "status" | string | ++---------------------+----------------------------------------------------------+---------+ +| ``seconds_elapsed`` | Time since restore started | uint64 | ++---------------------+----------------------------------------------------------+---------+ +| ``percent_done`` | Percentage of data restored (bytes_restored/total_bytes) | float64 | ++---------------------+----------------------------------------------------------+---------+ +| ``total_files`` | Total number of files detected | uint64 | ++---------------------+----------------------------------------------------------+---------+ +| ``files_restored`` | Files restored | uint64 | ++---------------------+----------------------------------------------------------+---------+ +| ``files_skipped`` | Files skipped due to overwrite setting | uint64 | ++---------------------+----------------------------------------------------------+---------+ +| ``files_deleted`` | Files deleted | uint64 | ++---------------------+----------------------------------------------------------+---------+ +| ``total_bytes`` | Total number of bytes in restore set | uint64 | ++---------------------+----------------------------------------------------------+---------+ +| ``bytes_restored`` | Number of bytes restored | uint64 | ++---------------------+----------------------------------------------------------+---------+ +| ``bytes_skipped`` | Total size of skipped files | uint64 | ++---------------------+----------------------------------------------------------+---------+ Error ^^^^^ These errors are printed on ``stderr``. -+-------------------+-------------------------------------------+ -| ``message_type`` | Always "error" | -+-------------------+-------------------------------------------+ -| ``error.message`` | Error message | -+-------------------+-------------------------------------------+ -| ``during`` | Always "restore" | -+-------------------+-------------------------------------------+ -| ``item`` | Usually, the path of the problematic file | -+-------------------+-------------------------------------------+ ++-------------------+-------------------------------------------+--------+ +| ``message_type`` | Always "error" | string | ++-------------------+-------------------------------------------+--------+ +| ``error.message`` | Error message | string | ++-------------------+-------------------------------------------+--------+ +| ``during`` | Always "restore" | string | ++-------------------+-------------------------------------------+--------+ +| ``item`` | Usually, the path of the problematic file | string | ++-------------------+-------------------------------------------+--------+ Verbose Status ^^^^^^^^^^^^^^ @@ -625,109 +647,111 @@ Verbose Status Verbose status provides details about the progress, including details about restored files. Only printed if `--verbose=2` is specified. -+------------------+--------------------------------------------------------+ -| ``message_type`` | Always "verbose_status" | -+------------------+--------------------------------------------------------+ -| ``action`` | Either "restored", "updated", "unchanged" or "deleted" | -+------------------+--------------------------------------------------------+ -| ``item`` | The item in question | -+------------------+--------------------------------------------------------+ -| ``size`` | Size of the item in bytes | -+------------------+--------------------------------------------------------+ ++------------------+--------------------------------------------------------+--------+ +| ``message_type`` | Always "verbose_status" | string | ++------------------+--------------------------------------------------------+--------+ +| ``action`` | Either "restored", "updated", "unchanged" or "deleted" | string | ++------------------+--------------------------------------------------------+--------+ +| ``item`` | The item in question | string | ++------------------+--------------------------------------------------------+--------+ +| ``size`` | Size of the item in bytes | uint64 | ++------------------+--------------------------------------------------------+--------+ Summary ^^^^^^^ -+---------------------+----------------------------------------+ -| ``message_type`` | Always "summary" | -+---------------------+----------------------------------------+ -| ``seconds_elapsed`` | Time since restore started | -+---------------------+----------------------------------------+ -| ``total_files`` | Total number of files detected | -+---------------------+----------------------------------------+ -| ``files_restored`` | Files restored | -+---------------------+----------------------------------------+ -| ``files_skipped`` | Files skipped due to overwrite setting | -+---------------------+----------------------------------------+ -| ``files_deleted`` | Files deleted | -+---------------------+----------------------------------------+ -| ``total_bytes`` | Total number of bytes in restore set | -+---------------------+----------------------------------------+ -| ``bytes_restored`` | Number of bytes restored | -+---------------------+----------------------------------------+ -| ``bytes_skipped`` | Total size of skipped files | -+---------------------+----------------------------------------+ ++---------------------+----------------------------------------+--------+ +| ``message_type`` | Always "summary" | string | ++---------------------+----------------------------------------+--------+ +| ``seconds_elapsed`` | Time since restore started | uint64 | ++---------------------+----------------------------------------+--------+ +| ``total_files`` | Total number of files detected | uint64 | ++---------------------+----------------------------------------+--------+ +| ``files_restored`` | Files restored | uint64 | ++---------------------+----------------------------------------+--------+ +| ``files_skipped`` | Files skipped due to overwrite setting | uint64 | ++---------------------+----------------------------------------+--------+ +| ``files_deleted`` | Files deleted | uint64 | ++---------------------+----------------------------------------+--------+ +| ``total_bytes`` | Total number of bytes in restore set | uint64 | ++---------------------+----------------------------------------+--------+ +| ``bytes_restored`` | Number of bytes restored | uint64 | ++---------------------+----------------------------------------+--------+ +| ``bytes_skipped`` | Total size of skipped files | uint64 | ++---------------------+----------------------------------------+--------+ snapshots --------- -The snapshots command returns a single JSON object, an array with objects of the structure outlined below. +The snapshots command returns a single JSON array with objects of the structure outlined below. -+---------------------+--------------------------------------------------+ -| ``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 | -+---------------------+--------------------------------------------------+ -| ``program_version`` | restic version used to create snapshot | -+---------------------+--------------------------------------------------+ -| ``summary`` | Snapshot statistics, see "Summary object" | -+---------------------+--------------------------------------------------+ -| ``id`` | Snapshot ID | -+---------------------+--------------------------------------------------+ -| ``short_id`` | Snapshot ID, short form | -+---------------------+--------------------------------------------------+ ++---------------------+--------------------------------------------------+---------------------------+ +| ``time`` | Timestamp of when the backup was started | time.Time | ++---------------------+--------------------------------------------------+---------------------------+ +| ``parent`` | ID of the parent snapshot | string | ++---------------------+--------------------------------------------------+---------------------------+ +| ``tree`` | ID of the root tree blob | string | ++---------------------+--------------------------------------------------+---------------------------+ +| ``paths`` | List of paths included in the backup | []string | ++---------------------+--------------------------------------------------+---------------------------+ +| ``hostname`` | Hostname of the backed up machine | string | ++---------------------+--------------------------------------------------+---------------------------+ +| ``username`` | Username the backup command was run as | string | ++---------------------+--------------------------------------------------+---------------------------+ +| ``uid`` | ID of owner | uint32 | ++---------------------+--------------------------------------------------+---------------------------+ +| ``gid`` | ID of group | uint32 | ++---------------------+--------------------------------------------------+---------------------------+ +| ``excludes`` | List of paths and globs excluded from the backup | []string | ++---------------------+--------------------------------------------------+---------------------------+ +| ``tags`` | List of tags for the snapshot in question | []string | ++---------------------+--------------------------------------------------+---------------------------+ +| ``program_version`` | restic version used to create snapshot | string | ++---------------------+--------------------------------------------------+---------------------------+ +| ``summary`` | Snapshot statistics | `SnapshotSummary object`_ | ++---------------------+--------------------------------------------------+---------------------------+ +| ``id`` | Snapshot ID | string | ++---------------------+--------------------------------------------------+---------------------------+ +| ``short_id`` | Snapshot ID, short form | string | ++---------------------+--------------------------------------------------+---------------------------+ -Summary object +.. _SnapshotSummary object: -The contained statistics reflect the information at the point in time when the snapshot +SnapshotSummary object + +The contained statistics reflect the information at the point64 in time when the snapshot was created. -+---------------------------+----------------------------------------------------+ -| ``backup_start`` | Time at which the backup was started | -+---------------------------+----------------------------------------------------+ -| ``backup_end`` | Time at which the backup was completed | -+---------------------------+----------------------------------------------------+ -| ``files_new`` | Number of new files | -+---------------------------+----------------------------------------------------+ -| ``files_changed`` | Number of files that changed | -+---------------------------+----------------------------------------------------+ -| ``files_unmodified`` | Number of files that did not change | -+---------------------------+----------------------------------------------------+ -| ``dirs_new`` | Number of new directories | -+---------------------------+----------------------------------------------------+ -| ``dirs_changed`` | Number of directories that changed | -+---------------------------+----------------------------------------------------+ -| ``dirs_unmodified`` | Number of directories that did not change | -+---------------------------+----------------------------------------------------+ -| ``data_blobs`` | Number of data blobs added | -+---------------------------+----------------------------------------------------+ -| ``tree_blobs`` | Number of tree blobs added | -+---------------------------+----------------------------------------------------+ -| ``data_added`` | Amount of (uncompressed) data added, in bytes | -+---------------------------+----------------------------------------------------+ -| ``data_added_packed`` | Amount of data added (after compression), in bytes | -+---------------------------+----------------------------------------------------+ -| ``total_files_processed`` | Total number of files processed | -+---------------------------+----------------------------------------------------+ -| ``total_bytes_processed`` | Total number of bytes processed | -+---------------------------+----------------------------------------------------+ ++---------------------------+----------------------------------------------------+-----------+ +| ``backup_start`` | Time at which the backup was started | time.Time | ++---------------------------+----------------------------------------------------+-----------+ +| ``backup_end`` | Time at which the backup was completed | time.Time | ++---------------------------+----------------------------------------------------+-----------+ +| ``files_new`` | Number of new files | uint64 | ++---------------------------+----------------------------------------------------+-----------+ +| ``files_changed`` | Number of files that changed | uint64 | ++---------------------------+----------------------------------------------------+-----------+ +| ``files_unmodified`` | Number of files that did not change | uint64 | ++---------------------------+----------------------------------------------------+-----------+ +| ``dirs_new`` | Number of new directories | uint64 | ++---------------------------+----------------------------------------------------+-----------+ +| ``dirs_changed`` | Number of directories that changed | uint64 | ++---------------------------+----------------------------------------------------+-----------+ +| ``dirs_unmodified`` | Number of directories that did not change | uint64 | ++---------------------------+----------------------------------------------------+-----------+ +| ``data_blobs`` | Number of data blobs added | int64 | ++---------------------------+----------------------------------------------------+-----------+ +| ``tree_blobs`` | Number of tree blobs added | int64 | ++---------------------------+----------------------------------------------------+-----------+ +| ``data_added`` | Amount of (uncompressed) data added, in bytes | uint64 | ++---------------------------+----------------------------------------------------+-----------+ +| ``data_added_packed`` | Amount of data added (after compression), in bytes | uint64 | ++---------------------------+----------------------------------------------------+-----------+ +| ``total_files_processed`` | Total number of files processed | uint64 | ++---------------------------+----------------------------------------------------+-----------+ +| ``total_bytes_processed`` | Total number of bytes processed | uint64 | ++---------------------------+----------------------------------------------------+-----------+ stats @@ -735,24 +759,24 @@ stats The stats command returns a single JSON object. -+------------------------------+-----------------------------------------------------+ -| ``total_size`` | Repository size in bytes | -+------------------------------+-----------------------------------------------------+ -| ``total_file_count`` | Number of files backed up in the repository | -+------------------------------+-----------------------------------------------------+ -| ``total_blob_count`` | Number of blobs in the repository | -+------------------------------+-----------------------------------------------------+ -| ``snapshots_count`` | Number of processed snapshots | -+------------------------------+-----------------------------------------------------+ -| ``total_uncompressed_size`` | Repository size in bytes if blobs were uncompressed | -+------------------------------+-----------------------------------------------------+ -| ``compression_ratio`` | Factor by which the already compressed data | -| | has shrunk due to compression | -+------------------------------+-----------------------------------------------------+ -| ``compression_progress`` | Percentage of already compressed data | -+------------------------------+-----------------------------------------------------+ -| ``compression_space_saving`` | Overall space saving due to compression | -+------------------------------+-----------------------------------------------------+ ++------------------------------+-----------------------------------------------------+---------+ +| ``total_size`` | Repository size in bytes | uint64 | ++------------------------------+-----------------------------------------------------+---------+ +| ``total_file_count`` | Number of files backed up in the repository | uint64 | ++------------------------------+-----------------------------------------------------+---------+ +| ``total_blob_count`` | Number of blobs in the repository | uint64 | ++------------------------------+-----------------------------------------------------+---------+ +| ``snapshots_count`` | Number of processed snapshots | uint64 | ++------------------------------+-----------------------------------------------------+---------+ +| ``total_uncompressed_size`` | Repository size in bytes if blobs were uncompressed | uint64 | ++------------------------------+-----------------------------------------------------+---------+ +| ``compression_ratio`` | Factor by which the already compressed data | float64 | +| | has shrunk due to compression | | ++------------------------------+-----------------------------------------------------+---------+ +| ``compression_progress`` | Percentage of already compressed data | float64 | ++------------------------------+-----------------------------------------------------+---------+ +| ``compression_space_saving`` | Overall space saving due to compression | float64 | ++------------------------------+-----------------------------------------------------+---------+ tag --- @@ -762,36 +786,36 @@ The ``tag`` command uses the JSON lines format with the following message types. Changed ^^^^^^^ -+---------------------+--------------------------------------+ -| ``message_type`` | Always "changed" | -+---------------------+--------------------------------------+ -| ``old_snapshot_id`` | ID of the snapshot before the change | -+---------------------+--------------------------------------+ -| ``new_snapshot_id`` | ID of the snapshot after the change | -+---------------------+--------------------------------------+ ++---------------------+--------------------------------------+--------+ +| ``message_type`` | Always "changed" | string | ++---------------------+--------------------------------------+--------+ +| ``old_snapshot_id`` | ID of the snapshot before the change | string | ++---------------------+--------------------------------------+--------+ +| ``new_snapshot_id`` | ID of the snapshot after the change | string | ++---------------------+--------------------------------------+--------+ Summary ^^^^^^^ -+----------------------------+-----------------------------------+ -| ``message_type`` | Always "summary" | -+----------------------------+-----------------------------------+ -| ``changed_snapshot_count`` | Total number of changed snapshots | -+----------------------------+-----------------------------------+ ++----------------------------+-----------------------------------+--------+ +| ``message_type`` | Always "summary" | string | ++----------------------------+-----------------------------------+--------+ +| ``changed_snapshot_count`` | Total number of changed snapshots | int64 | ++----------------------------+-----------------------------------+--------+ version ------- The version command returns a single JSON object. -+------------------+--------------------+ -| ``message_type`` | Always "version" | -+------------------+--------------------+ -| ``version`` | restic version | -+------------------+--------------------+ -| ``go_version`` | Go compile version | -+------------------+--------------------+ -| ``go_os`` | Go OS | -+------------------+--------------------+ -| ``go_arch`` | Go architecture | -+------------------+--------------------+ ++------------------+--------------------+--------+ +| ``message_type`` | Always "version" | string | ++------------------+--------------------+--------+ +| ``version`` | restic version | string | ++------------------+--------------------+--------+ +| ``go_version`` | Go compile version | string | ++------------------+--------------------+--------+ +| ``go_os`` | Go OS | string | ++------------------+--------------------+--------+ +| ``go_arch`` | Go architecture | string | ++------------------+--------------------+--------+