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.
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.
Required authorization
- Cluster privileges monitor_snapshot
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.
Response
-
snapshotsobjectrequired -
include_global_statebooleanrequired -
Indicates whether the current cluster state is included in the snapshot.
-
indicesmap string to objectrequired -
<string>object -
shardsmap string to objectrequired -
<string>object -
stagerequired -
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 -
statsobjectrequired -
incrementalobjectrequired -
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.
-
start_time_in_millisnumberrequired -
The time, in milliseconds, when the snapshot creation process started.
-
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.
-
statsobjectrequired -
Details about the number (
file_count) and size (size_in_bytes) of files included in the snapshot. -
incrementalobjectrequired -
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.
-
start_time_in_millisnumberrequired -
The time, in milliseconds, when the snapshot creation process started.