The snapshot inspect command is used to inspect an atomic, point-in-time
snapshot of the state of the Consul servers which includes key/value entries,
service catalog, prepared queries, sessions, and ACLs. The snapshot is read
from the given file.
Typically this is used with Consul self-contained Snapshot files obtained
using the consul snapshot command or Snapshot
API. If the file provided is named
state.bin however, the command will assume it is a raw raft snapshot in a
Consul server data directory and will attempt to read it directly. The
state.bin file must still be in the same directory as it's associated
meta.json file. This is useful for debugging data on live servers without
making a complete new snapshot via the CLI or API first.
The following fields are displayed when inspecting a snapshot:
ID - A unique ID for the snapshot, only used for differentiation purposes.
-kvdetails - Provides information about space usage for KV data stored in Consul.
-kvdepth - Adjusts the grouping levels of keys.
Can only be used with -kvdetails.
Default is 2.
-kvfilter - Only keys that match the specified key prefix
are included in the response.
Can only be used with -kvdetails.
-format - Specifies an output format for the response.
Specify pretty (default) to format the response in a human-readable form
as shown in the examples below,
or specify JSON to format the response as JSON.