Reputation: 149
Can I monitor Elasticsearch's Restore process? I am looking for a GET request in Elasticsearch's API that checks if restore has finished.
I'm restoring indices from a snapshot I've created, but how can I know if the restore has finished?
waitUntilRestoreFromSnapshotIsFinished(ElasticsearchClient EsClient) {
//what to do here??
}
Upvotes: 5
Views: 6446
Reputation: 149
I've got an answer for this that helped me, hope it helps you all:
You can use this Elasticsearch API: GET: <your_host>/_cat/recovery?v&pretty&human
Then filter the result by the recovery_type of "snapshot" and look at the progress percentage (for one snapshot there might be more than one recovery)
Upvotes: 2