# How to monitor restore from snapshot - failure case?

**URL:** <https://discuss.elastic.co/t/how-to-monitor-restore-from-snapshot-failure-case/269012>\
**Category:** Elasticsearch\
**Tags:** snapshot-and-restore\
**Created:** [April 1, 2021, 10:04am UTC](https://discuss.elastic.co/t/how-to-monitor-restore-from-snapshot-failure-case/269012 "2021-04-01T10:04:39Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lavanya](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lavanya/32/86454_2.png) [@Lavanya](https://discuss.elastic.co/u/Lavanya)\
**Post date:** [April 1, 2021, 10:04am UTC](https://discuss.elastic.co/t/how-to-monitor-restore-from-snapshot-failure-case/269012/1 "2021-04-01T10:04:39Z")

</div>

I found that /\_cat/recovery API gives information about ongoing and completed snapshot recovery activity.

In this response body, there is an attribute called stage whose possible values are { init, index, start, translog, finalize, done } but this doesn't say whether restore is failed or succeed.

I would like to know how to determine the restore is failed.

Thanks for your help in advance.

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [April 1, 2021, 10:49am UTC](https://discuss.elastic.co/t/how-to-monitor-restore-from-snapshot-failure-case/269012/2 "2021-04-01T10:49:47Z")

</div>

If the restore fails then the cluster health is reported as `red`.

---

<div class="post-metadata">

**Author:** ![Lavanya](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lavanya/32/86454_2.png) [@Lavanya](https://discuss.elastic.co/u/Lavanya)\
**Post date:** [April 1, 2021, 11:18am UTC](https://discuss.elastic.co/t/how-to-monitor-restore-from-snapshot-failure-case/269012/3 "2021-04-01T11:18:28Z")

</div>

Thanks @DavidTurner.

Cluster health can be red for other reasons as well. How could we differentiate that cluster health is red due of restore failure.

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [April 1, 2021, 11:29am UTC](https://discuss.elastic.co/t/how-to-monitor-restore-from-snapshot-failure-case/269012/4 "2021-04-01T11:29:38Z")

</div>

It is true, the restore might succeed and then one of the primaries fails for a different reason. Does the distinction matter? Can you explain how you would react differently in the two cases?

You can tell the difference with the cluster allocation explain API.

---

<div class="post-metadata">

**Author:** ![Lavanya](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lavanya/32/86454_2.png) [@Lavanya](https://discuss.elastic.co/u/Lavanya)\
**Post date:** [April 1, 2021, 11:57am UTC](https://discuss.elastic.co/t/how-to-monitor-restore-from-snapshot-failure-case/269012/5 "2021-04-01T11:57:57Z")

</div>

I have a utility where the user triggers the restore and we provide detailed report about the execution whether this job is on-going, succeed or failed. So, here comes this case.

If we know that restore is not successful then we can understand that issue may be with snapshot or something around the snapshot restore area to be fixed. And we can re-attempt the restore.

If there is any distinction for this it will help.

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [April 1, 2021, 1:00pm UTC](https://discuss.elastic.co/t/how-to-monitor-restore-from-snapshot-failure-case/269012/6 "2021-04-01T13:00:06Z")

</div>

I'm still not sure I see the need to distinguish the two cases. Either way you will want to use the cluster allocation explain API to describe the problem to the user.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [April 29, 2021, 1:00pm UTC](https://discuss.elastic.co/t/how-to-monitor-restore-from-snapshot-failure-case/269012/7 "2021-04-29T13:00:08Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
