# Corrupt Index Exception Guidance

**URL:** <https://discuss.elastic.co/t/corrupt-index-exception-guidance/159593>\
**Category:** Elasticsearch\
**Created:** [December 5, 2018, 7:23pm UTC](https://discuss.elastic.co/t/corrupt-index-exception-guidance/159593 "2018-12-05T19:23:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rohail\_kidwai1](https://avatars.discourse-cdn.com/v4/letter/r/46a35a/32.png) [@rohail\_kidwai1](https://discuss.elastic.co/u/rohail_kidwai1)\
**Post date:** [December 5, 2018, 7:23pm UTC](https://discuss.elastic.co/t/corrupt-index-exception-guidance/159593/1 "2018-12-05T19:23:37Z")

</div>

I'm looking for guidance on what my options are when I have a corrupt index.

I found this out when trying to snapshot and it failed due to a corrupt index.  
For more Info:  
[https://discuss.elastic.co/t/understanding-index-shard-snapshot-failed-exception/159572/5](https://discuss.elastic.co/t/understanding-index-shard-snapshot-failed-exception/159572/5)

I don't know how to tell if it's a replica or primary so the only thing I know right now is the name of the corrupted index.

Also I am not seeing anything standout when I do  
`GET /INDEX/_stats`

It seems a lot of information on corrupt indices seems to be on older ES versions. (I'm on 6.1) So before I follow one of those guides, I am just wondering what/where is the latest information and guidance to resolve this issue?

---

<div class="post-metadata">

**Author:** ![rohail\_kidwai1](https://avatars.discourse-cdn.com/v4/letter/r/46a35a/32.png) [@rohail\_kidwai1](https://discuss.elastic.co/u/rohail_kidwai1)\
**Post date:** [December 6, 2018, 4:06pm UTC](https://discuss.elastic.co/t/corrupt-index-exception-guidance/159593/2 "2018-12-06T16:06:19Z")

</div>

An update to this:

I figured out that the corrupted shard id is 0 just from looking closer at the snapshot error.  
Then afterwards doing:

> GET \_cat/shards/winlog-2018.09.05

I get:

> INDEX-2018.09.05 0 r STARTED 71460755 36.7gb IP.ADDRESS NODE-master-3  
> INDEX-2018.09.05 0 p STARTED 71460755 36.7gb IP.ADDRESS NODE-master-2

I'm assuming the r and p stand for replica and primary. I want to delete the primary in hopes that maybe only that is corrupt. Can someone point me to the correct api for this?

---

<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:** [January 3, 2019, 4:06pm UTC](https://discuss.elastic.co/t/corrupt-index-exception-guidance/159593/3 "2019-01-03T16:06:21Z")

</div>

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