Update docs with new flags

pull/9098/head
Joel Watson 2020-11-05 10:31:36 -06:00
parent 4bf70dd857
commit 52ea53f95e
1 changed files with 61 additions and 75 deletions

View File

@ -38,87 +38,70 @@ To inspect a snapshot from the file "backup.snap":
```shell-session ```shell-session
$ consul snapshot inspect backup.snap $ consul snapshot inspect backup.snap
ID 2-13-1603221729747 ID 2-12426-1604593650375
Size 5141 Size 17228
Index 13 Index 12426
Term 2 Term 2
Version 1 Version 1
Type Count Size Type Count Size
---- ---- ---- ---- ---- ----
Register 3 1.7KB KVS 27 12.3KB
ConnectCA 1 1.2KB Register 5 3.4KB
ConnectCAProviderState 1 1.1KB Index 11 285B
Index 12 344B Autopilot 1 199B
Autopilot 1 199B Session 1 199B
ConnectCAConfig 1 197B CoordinateBatchUpdate 1 166B
FederationState 1 139B Tombstone 2 146B
SystemMetadata 1 68B FederationState 1 139B
ChunkingState 1 12B ChunkingState 1 12B
---- ---- ---- ---- ---- ----
Total 5KB Total 16.8KB
``` ```
To enhance a snapshot inespection from "backup.snap": To get more details for a snapshot inspection from "backup.snap":
```shell-session ```shell-session
$ consul snapshot inspect -format=json backup.snap $ consul snapshot inspect -detailed -depth 3 -filter vault/core backup.snap
{ ID 2-12426-1604593650375
"Meta": { Size 17228
"ID": "2-13-1603221729747", Index 12426
"Size": 5141, Term 2
"Index": 13, Version 1
"Term": 2,
"Version": 1 Type Count Size
}, ---- ---- ----
"Stats": [ KVS 27 12.3KB
{ Register 5 3.4KB
"Name": "Register", Index 11 285B
"Sum": 1750, Autopilot 1 199B
"Count": 3 Session 1 199B
}, CoordinateBatchUpdate 1 166B
{ Tombstone 2 146B
"Name": "ConnectCA", FederationState 1 139B
"Sum": 1258, ChunkingState 1 12B
"Count": 1 ---- ---- ----
}, Total 16.8KB
{
"Name": "ConnectCAProviderState", Key Name Count Size
"Sum": 1174, ---- ---- ----
"Count": 1 vault/core/leader 1 1.6KB
}, vault/core/mounts 1 675B
{ vault/core/wrapping 1 633B
"Name": "Index", vault/core/local-mounts 1 450B
"Sum": 344, vault/core/auth 1 423B
"Count": 12 vault/core/cluster 2 388B
}, vault/core/keyring 1 320B
{ vault/core/master 1 237B
"Name": "Autopilot", vault/core/seal-config 1 211B
"Sum": 199, vault/core/hsm 1 189B
"Count": 1 vault/core/local-audit 1 185B
}, vault/core/local-auth 1 183B
{ vault/core/audit 1 179B
"Name": "ConnectCAConfig", vault/core/lock 1 170B
"Sum": 197, vault/core/shamir-kek 1 159B
"Count": 1 ---- ---- ----
}, Total 5.9KB
{
"Name": "FederationState",
"Sum": 139,
"Count": 1
},
{
"Name": "SystemMetadata",
"Sum": 68,
"Count": 1
},
{
"Name": "ChunkingState",
"Sum": 12,
"Count": 1
}
],
"TotalSize": 5141
}
``` ```
Please see the [HTTP API](/api/snapshot) documentation for Please see the [HTTP API](/api/snapshot) documentation for
@ -126,4 +109,7 @@ more details about snapshot internals.
#### Command Options #### Command Options
- `-detailed` - Optional, provides a key space usage breakdown for any KV data stored in Consul.
- `-depth` - Optional, used with `-detailed` to adjust the grouping level of keys. Defaults to 2.
- `-filter` - Optional, used with `-detailed` to specify a key prefix that excludes keys that don't match.
- `-format` - Optional, allows from changing the output to JSON. Parameters accepted are "pretty" and "JSON". - `-format` - Optional, allows from changing the output to JSON. Parameters accepted are "pretty" and "JSON".