Get the snapshot status Added in 7.8.0

GET /_snapshot/{repository}/{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.

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.

Path parameters

  • repository string Required

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

  • snapshot string | array[string] Required

    A comma-separated list of snapshots to retrieve status for. The default is currently running snapshots. Wildcards (*) are not supported.

Query parameters

  • 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.

  • 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.

Responses

  • 200 application/json
    Hide response attribute Show response attribute object
    • snapshots array[object] Required
      Hide snapshots attributes Show snapshots attributes object
      • include_global_state boolean Required

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

      • indices object Required
        Hide indices attribute Show indices attribute object
        • * object Additional properties

          Additional properties are allowed.

          Hide * attributes Show * attributes object
          • shards object Required
            Hide shards attribute Show shards attribute object
            • * object Additional properties

              Additional properties are allowed.

          • shards_stats object Required

            Additional properties are allowed.

            Hide shards_stats attributes Show shards_stats attributes object
            • 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

            Additional properties are allowed.

            Hide stats attributes Show stats attributes object
            • incremental object Required

              Additional properties are allowed.

            • time string

              A duration. Units can be nanos, micros, ms (milliseconds), s (seconds), m (minutes), h (hours) and d (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.

            • total object Required

              Additional properties are allowed.

      • repository string Required

        The name of the repository that includes the snapshot.

      • shards_stats object Required

        Additional properties are allowed.

        Hide shards_stats attributes Show shards_stats attributes object
        • 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:

        • FAILED: The snapshot finished with an error and failed to store any data.
        • STARTED: The snapshot is currently running.
        • SUCCESS: The snapshot completed.
      • stats object Required

        Additional properties are allowed.

        Hide stats attributes Show stats attributes object
        • incremental object Required

          Additional properties are allowed.

          Hide incremental attributes Show incremental attributes object
        • Time unit for milliseconds

        • time string

          A duration. Units can be nanos, micros, ms (milliseconds), s (seconds), m (minutes), h (hours) and d (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.

        • Time unit for milliseconds

        • total object Required

          Additional properties are allowed.

          Hide total attributes Show total attributes object
      • uuid string Required
GET /_snapshot/{repository}/{snapshot}/_status
curl \
 --request GET http://api.example.com/_snapshot/{repository}/{snapshot}/_status
Response examples (200)
{
  "snapshots": [
    {
      "include_global_state": true,
      "indices": {
        "additionalProperty1": {
          "shards": {
            "additionalProperty1": {},
            "additionalProperty2": {}
          },
          "shards_stats": {
            "done": 42.0,
            "failed": 42.0,
            "finalizing": 42.0,
            "initializing": 42.0,
            "started": 42.0,
            "total": 42.0
          },
          "stats": {
            "incremental": {},
            "time": "string",
            "total": {}
          }
        },
        "additionalProperty2": {
          "shards": {
            "additionalProperty1": {},
            "additionalProperty2": {}
          },
          "shards_stats": {
            "done": 42.0,
            "failed": 42.0,
            "finalizing": 42.0,
            "initializing": 42.0,
            "started": 42.0,
            "total": 42.0
          },
          "stats": {
            "incremental": {},
            "time": "string",
            "total": {}
          }
        }
      },
      "repository": "string",
      "shards_stats": {
        "done": 42.0,
        "failed": 42.0,
        "finalizing": 42.0,
        "initializing": 42.0,
        "started": 42.0,
        "total": 42.0
      },
      "snapshot": "string",
      "state": "string",
      "stats": {
        "incremental": {
          "file_count": 42.0,
          "size_in_bytes": 42.0
        },
        "": 42.0,
        "time": "string",
        "total": {
          "file_count": 42.0,
          "size_in_bytes": 42.0
        }
      },
      "uuid": "string"
    }
  ]
}