Get shard recovery information
Get information about ongoing and completed shard recoveries. Shard recovery is the process of initializing a shard copy, such as restoring a primary shard from a snapshot or syncing a replica shard from a primary shard. When a shard recovery completes, the recovered shard is available for search and indexing. For data streams, the API returns information about the stream’s backing indices. IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the index recovery API.
Query parameters
-
active_only boolean
If
true
, the response only includes ongoing shard recoveries. -
bytes string
The unit used to display byte values.
Values are
b
,kb
,mb
,gb
,tb
, orpb
. -
detailed boolean
If
true
, the response includes detailed information about shard recoveries. -
time string
Unit used to display time values.
Values are
nanos
,micros
,ms
,s
,m
,h
, ord
.
curl \
-X GET http://api.example.com/_cat/recovery
[
{
"index": "string",
"shard": "string",
"": "string",
"time": "string",
"type": "string",
"stage": "string",
"source_host": "string",
"source_node": "string",
"target_host": "string",
"target_node": "string",
"repository": "string",
"snapshot": "string",
"files": "string",
"files_recovered": "string",
"files_total": "string",
"bytes": "string",
"bytes_recovered": "string",
"bytes_total": "string",
"translog_ops": "string",
"translog_ops_recovered": "string"
}
]
index shard time type stage source_host source_node target_host target_node repository snapshot files files_recovered files_percent files_total bytes bytes_recovered bytes_percent bytes_total translog_ops translog_ops_recovered translog_ops_percent
my-index-000001 0 13ms store done n/a n/a 127.0.0.1 node-0 n/a n/a 0 0 100% 13 0b 0b 100% 9928b 0 0 100.0%
i s t ty st shost thost f fp b bp
my-index-000001 0 1252ms peer done 192.168.1.1 192.168.1.2 0 100.0% 0b 100.0%
i s t ty st rep snap f fp b bp
my-index-000001 0 1978ms snapshot done my-repo snap-1 79 8.0% 12086 9.0%