This topic describes how to query the status of snapshots that are automatically created on your Alibaba Cloud Elasticsearch cluster to obtain the creation progress of snapshots in real time.

After you enable the auto snapshot feature, log on to the Kibana console of your Elasticsearch cluster. In the left-side navigation pane, click Dev Tools. On the page that appears, click the Console tab. On this tab, call the snapshot operation to query the status of automatically created snapshots.
Note

Query all snapshots

Run the following command to query information about all snapshots stored in the aliyun_auto_snapshot repository.

GET _snapshot/aliyun_auto_snapshot/_all

If the command is executed successfully, the following result is returned:

{
  "snapshots": [
    {
      "snapshot": "es-cn-abxxxxxxxxxlmn_20180628092236",
      "uuid": "n7YxxxxxxxxxxxxdA",
      "version_id": 5050399,
      "version": "5.5.3",
      "indices": [
        ".kibana"
      ],
      "state": "SUCCESS",
      "start_time": "2018-06-28T01:22:39.609Z",
      "start_time_in_millis": 1530148959609,
      "end_time": "2018-06-28T01:22:39.923Z",
      "end_time_in_millis": 1530148959923,
      "duration_in_millis": 314,
      "failures": [],
      "shards": {
        "total": 1,
        "failed": 0,
        "successful": 1
      }
    },
    {
      "snapshot": "es-cn-abxxxxxxxxxmn_20180628092500",
      "uuid": "frdxxxxxxxxxxxxKLA",
      "version_id": 5050399,
      "version": "5.5.3",
      "indices": [
        ".kibana"
      ],
      "state": "SUCCESS",
      "start_time": "2018-06-28T01:25:00.764Z",
      "start_time_in_millis": 1530149100764,
      "end_time": "2018-06-28T01:25:01.482Z",
      "end_time_in_millis": 1530149101482,
      "duration_in_millis": 718,
      "failures": [],
      "shards": {
        "total": 1,
        "failed": 0,
        "successful": 1
      }
    }
  ]
}
state: indicates the status of a snapshot. A snapshot can be in one of the following states.
State Description
IN_PROGRESS The snapshot is being created.
SUCCESS The snapshot is created, and all shards are stored.
FAILED The snapshot fails to be created because some shards cannot be stored.
PARTIAL The snapshot is created, but at least one shard fails to be stored.
INCOMPATIBLE The snapshot version is incompatible with the cluster version.

Query a specified snapshot

Run the following command to query information about a specified snapshot stored in the aliyun_auto_snapshot repository.

GET _snapshot/aliyun_auto_snapshot/<snapshot>/_status

Replace <snapshot> with the name of the snapshot, such as es-cn-abxxxxxxxxxxlmn_20180628092236. You can use the command in Query all snapshots to query the name of a snapshot.

If the command is executed successfully, the following result is returned:
{
  "snapshots": [
    {
      "snapshot": "es-cn-abxxxxxxxxxxlmn_20180628092236",
      "repository": "aliyun_auto_snapshot",
      "uuid": "n7YxxxxxxxxxxxxydA",
      "state": "SUCCESS",
      "shards_stats": {
        "initializing": 0,
        "started": 0,
        "finalizing": 0,
        "done": 1,
        "failed": 0,
        "total": 1
      },
      "stats": {
        "number_of_files": 4,
        "processed_files": 4,
        "total_size_in_bytes": 3296,
        "processed_size_in_bytes": 3296,
        "start_time_in_millis": 1530148959688,
        "time_in_millis": 77
      },
      "indices": {
        ".kibana": {
          "shards_stats": {
            "initializing": 0,
            "started": 0,
            "finalizing": 0,
            "done": 1,
            "failed": 0,
            "total": 1
          },
          "stats": {
            "number_of_files": 4,
            "processed_files": 4,
            "total_size_in_bytes": 3296,
            "processed_size_in_bytes": 3296,
            "start_time_in_millis": 1530148959688,
            "time_in_millis": 77
          },
          "shards": {
            "0": {
              "stage": "DONE",
              "stats": {
                "number_of_files": 4,
                "processed_files": 4,
                "total_size_in_bytes": 3296,
                "processed_size_in_bytes": 3296,
                "start_time_in_millis": 1530148959688,
                "time_in_millis": 77
              }
            }
          }
        }
      }
    }
  ]
}