Get the snapshot status
- GET /_snapshot/{repository}/{snapshot}/_status
- GET /_snapshot/{repository}/_status
- GET /_snapshot/_status
Get a detailed description of the current state for each shard participating in the snapshot.
Note that this API should be used only to obtain detailed shard-level information for ongoing snapshots. If this detail is not needed or you want to obtain information about one or more existing snapshots, use the get snapshot API.
If you omit the <snapshot> request path parameter, the request retrieves information only for currently running snapshots.
This usage is preferred.
If needed, you can specify <repository> and <snapshot> to retrieve information for specific snapshots, even if they're not currently running.
Note that the stats will not be available for any shard snapshots in an ongoing snapshot completed by a node that (even momentarily) left the cluster. Loading the stats from the repository is an expensive operation (see the WARNING below). Therefore the stats values for such shards will be -1 even though the "stage" value will be "DONE", in order to minimize latency. A "description" field will be present for a shard snapshot completed by a departed node explaining why the shard snapshot's stats results are invalid. Consequently, the total stats for the index will be less than expected due to the missing values from these shards.
WARNING: Using the API to return the status of any snapshots other than currently running snapshots can be expensive. The API requires a read from the repository for each shard in each snapshot. For example, if you have 100 snapshots with 1,000 shards each, an API request that includes all snapshots will require 100,000 reads (100 snapshots x 1,000 shards).
Depending on the latency of your storage, such requests can take an extremely long time to return results. These requests can also tax machine resources and, when using cloud storage, incur high processing costs.
- Cluster privileges:
monitor_snapshot
Path Parameters
-
repositorystring Nameoptional -
The snapshot repository name used to limit the request. It supports wildcards (
*) if<snapshot>isn't specified.Leave it out to use
/_snapshot/_status. -
snapshotName | Nameoptional -
A comma-separated list of snapshots to retrieve status for. The default is currently running snapshots. Wildcards (
*) are not supported.Leave it out to use
/_snapshot/_status.
Query Parameters
If
false, the request returns an error for any snapshots that are unavailable. Iftrue, the request ignores snapshots that are unavailable, such as those that are corrupted or temporarily cannot be returned.-
master_timeoutstring Duration · default: 30s The period to wait for the master node. If the master node is not available before the timeout expires, the request fails and returns an error. To indicate that the request should never timeout, set it to
-1.
Response
-
snapshotsStatusrequired -
include_global_statebooleanrequired -
Indicates whether the current cluster state is included in the snapshot.
-
indicesmap string to SnapshotIndexStatsrequired -
<string>SnapshotIndexStats -
shardsmap string to SnapshotShardsStatusrequired -
<string>SnapshotShardsStatus -
stageShardsStatsStagerequired -
Supported values include:
DONE: The number of shards in the snapshot that were successfully stored in the repository.FAILURE: The number of shards in the snapshot that were not successfully stored in the repository.FINALIZE: The number of shards in the snapshot that are in the finalizing stage of being stored in the repository.INIT: The number of shards in the snapshot that are in the initializing stage of being stored in the repository.STARTED: The number of shards in the snapshot that are in the started stage of being stored in the repository.
-
Values:
DONEFAILUREFINALIZEINITSTARTED -
statsShardsStatsSummaryrequired -
incrementalShardsStatsSummaryItemrequired -
file_countnumberrequired -
size_in_bytesnumberrequired -
totalShardsStatsSummaryItemrequired -
file_countnumberrequired -
size_in_bytesnumberrequired -
start_time_in_millisEpochTimeUnitMillisrequired -
timestring Duration -
time_in_millisDurationValueUnitMillisrequired -
shards_statsShardsStatsrequired -
donenumberrequired -
The number of shards that initialized, started, and finalized successfully.
-
failednumberrequired -
The number of shards that failed to be included in the snapshot.
-
finalizingnumberrequired -
The number of shards that are finalizing but are not done.
-
initializingnumberrequired -
The number of shards that are still initializing.
-
startednumberrequired -
The number of shards that have started but are not finalized.
-
totalnumberrequired -
The total number of shards included in the snapshot.
-
statsSnapshotStatsrequired -
incrementalFileCountSnapshotStatsrequired -
The number and size of files that still need to be copied as part of the incremental snapshot. For completed snapshots, this property indicates the number and size of files that were not already in the repository and were copied as part of the incremental snapshot.
-
file_countnumberrequired -
size_in_bytesnumberrequired -
start_time_in_millisEpochTimeUnitMillisrequired -
The time, in milliseconds, when the snapshot creation process started.
-
timestring Duration -
time_in_millisDurationValueUnitMillisrequired -
The total time, in milliseconds, that it took for the snapshot process to complete.
-
totalFileCountSnapshotStatsrequired -
The total number and size of files that are referenced by the snapshot.
-
file_countnumberrequired -
size_in_bytesnumberrequired -
repositorystringrequired -
The name of the repository that includes the snapshot.
-
shards_statsShardsStatsrequired -
Statistics for the shards in the snapshot.
-
donenumberrequired -
The number of shards that initialized, started, and finalized successfully.
-
failednumberrequired -
The number of shards that failed to be included in the snapshot.
-
finalizingnumberrequired -
The number of shards that are finalizing but are not done.
-
initializingnumberrequired -
The number of shards that are still initializing.
-
startednumberrequired -
The number of shards that have started but are not finalized.
-
totalnumberrequired -
The total number of shards included in the snapshot.
-
snapshotstringrequired -
The name of the snapshot.
-
statestringrequired -
The current snapshot state:
STARTED: The snapshot is currently running.SUCCESS: All shard snapshots have completed. The snapshot may or may not have completed finalization.FAILED: The snapshot finished with an error and failed to store any data.
-
statsSnapshotStatsrequired -
Details about the number (
file_count) and size (size_in_bytes) of files included in the snapshot. -
incrementalFileCountSnapshotStatsrequired -
The number and size of files that still need to be copied as part of the incremental snapshot. For completed snapshots, this property indicates the number and size of files that were not already in the repository and were copied as part of the incremental snapshot.
-
file_countnumberrequired -
size_in_bytesnumberrequired -
start_time_in_millisEpochTimeUnitMillisrequired -
The time, in milliseconds, when the snapshot creation process started.
-
timestring Duration -
time_in_millisDurationValueUnitMillisrequired -
The total time, in milliseconds, that it took for the snapshot process to complete.
-
totalFileCountSnapshotStatsrequired -
The total number and size of files that are referenced by the snapshot.
-
file_countnumberrequired -
size_in_bytesnumberrequired -
uuidstringrequired -
The universally unique identifier (UUID) for the snapshot.