2020-04-07 18:55:19 +00:00
|
|
|
---
|
|
|
|
layout: docs
|
|
|
|
page_title: 'Commands: Snapshot Inspect'
|
2020-04-13 18:40:26 +00:00
|
|
|
sidebar_title: inspect
|
2020-04-07 18:55:19 +00:00
|
|
|
---
|
|
|
|
|
|
|
|
# Consul Snapshot Inspect
|
|
|
|
|
|
|
|
Command: `consul snapshot inspect`
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
The following fields are displayed when inspecting a snapshot:
|
|
|
|
|
|
|
|
- `ID` - A unique ID for the snapshot, only used for differentiation purposes.
|
|
|
|
|
|
|
|
- `Size` - The size of the snapshot, in bytes.
|
|
|
|
|
|
|
|
- `Index` - The Raft index of the latest log entry in the snapshot.
|
|
|
|
|
|
|
|
- `Term` - The Raft term of the latest log entry in the snapshot.
|
|
|
|
|
|
|
|
- `Version` - The snapshot format version. This only refers to the structure of
|
|
|
|
the snapshot, not the data contained within.
|
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
|
|
|
Usage: `consul snapshot inspect [options] FILE`
|
|
|
|
|
|
|
|
## Examples
|
|
|
|
|
|
|
|
To inspect a snapshot from the file "backup.snap":
|
|
|
|
|
|
|
|
```text
|
|
|
|
$ consul snapshot inspect backup.snap
|
|
|
|
ID 2-5-1477944140022
|
|
|
|
Size 667
|
|
|
|
Index 5
|
|
|
|
Term 2
|
|
|
|
Version 1
|
|
|
|
```
|
|
|
|
|
2020-04-09 23:46:54 +00:00
|
|
|
Please see the [HTTP API](/api/snapshot) documentation for
|
2020-04-07 18:55:19 +00:00
|
|
|
more details about snapshot internals.
|