Get the snapshot status

Auth

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.

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.

Required authorization

Cluster privileges monitor_snapshot

Path parameters

repository string optional

The snapshot repository name used to limit the request. It supports wildcards (*) if <snapshot> isn't specified.

Leave it out to use /_snapshot/_status.

snapshot union string | string[] optional

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

ignore_unavailable boolean · default: false

If false, the request returns an error for any snapshots that are unavailable. If true, the request ignores snapshots that are unavailable, such as those that are corrupted or temporarily cannot be returned.

master_timeout string · 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

application/json
snapshots object[] required
include_global_state boolean required

Indicates whether the current cluster state is included in the snapshot.

indices map string to object required
<string> object
shards map string to object required
<string> object
stage enum required

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: DONE FAILURE FINALIZE INIT STARTED
stats object required
incremental object required
file_count number required
size_in_bytes number required
total object required
file_count number required
size_in_bytes number required
start_time_in_millis number required
time string
time_in_millis number required
shards_stats object required
done number required

The number of shards that initialized, started, and finalized successfully.

failed number required

The number of shards that failed to be included in the snapshot.

finalizing number required

The number of shards that are finalizing but are not done.

initializing number required

The number of shards that are still initializing.

started number required

The number of shards that have started but are not finalized.

total number required

The total number of shards included in the snapshot.

stats object required
incremental object required

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_count number required
size_in_bytes number required
start_time_in_millis number required

The time, in milliseconds, when the snapshot creation process started.

time string
time_in_millis number required

The total time, in milliseconds, that it took for the snapshot process to complete.

total object required

The total number and size of files that are referenced by the snapshot.

file_count number required
size_in_bytes number required
repository string required

The name of the repository that includes the snapshot.

shards_stats object required

Statistics for the shards in the snapshot.

done number required

The number of shards that initialized, started, and finalized successfully.

failed number required

The number of shards that failed to be included in the snapshot.

finalizing number required

The number of shards that are finalizing but are not done.

initializing number required

The number of shards that are still initializing.

started number required

The number of shards that have started but are not finalized.

total number required

The total number of shards included in the snapshot.

snapshot string required

The name of the snapshot.

state string required

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.
stats object required

Details about the number (file_count) and size (size_in_bytes) of files included in the snapshot.

incremental object required

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_count number required
size_in_bytes number required
start_time_in_millis number required

The time, in milliseconds, when the snapshot creation process started.

time string
time_in_millis number required

The total time, in milliseconds, that it took for the snapshot process to complete.

total object required

The total number and size of files that are referenced by the snapshot.

file_count number required
size_in_bytes number required
uuid string required

The universally unique identifier (UUID) for the snapshot.