# Indices don't have primary shards while taking snapshot

**URL:** <https://discuss.elastic.co/t/indices-dont-have-primary-shards-while-taking-snapshot/267619>\
**Category:** Elasticsearch\
**Tags:** snapshot-and-restore\
**Created:** [March 18, 2021, 8:29am UTC](https://discuss.elastic.co/t/indices-dont-have-primary-shards-while-taking-snapshot/267619 "2021-03-18T08:29:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Venkatesh\_Kumar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/venkatesh_kumar/32/82003_2.png) [@Venkatesh\_Kumar](https://discuss.elastic.co/u/Venkatesh_Kumar)\
**Post date:** [March 18, 2021, 8:29am UTC](https://discuss.elastic.co/t/indices-dont-have-primary-shards-while-taking-snapshot/267619/1 "2021-03-18T08:29:07Z")

</div>

Hi ,

I am trying to take snapshot using

```
curl -X PUT "http://localhost:9200/_snapshot/repo1/snap1?wait_for_completion=true&pretty" -H 'Content-Type: application/json' -d"
{
    \"indices\": [\"apm-7.10.1-transaction-000002\"],
    \"ignore_unavailable\": true,
    \"include_global_state\": false
}
"

```

I am getting error as :

```
{
  "error" : {
"root_cause" : [
  {
    "type" : "snapshot_exception",
    "reason" : "[repo1:snap1/3MfwBD5vTBCKY_a1pzk_OA] Indices don't have primary shards [apm-7.10.1-transaction-000002]"
  }
],
"type" : "snapshot_exception",
"reason" : "[repo1:snap1/3MfwBD5vTBCKY_a1pzk_OA] Indices don't have primary shards [apm-7.10.1-transaction-000002]"
  },
  "status" : 500
}

```

health status of indices :

```
apm-7.10.1-transaction-000002 0 p STARTED
apm-7.10.1-transaction-000002 0 r UNASSIGNED

```

Still I can able to see the data in discover page. Is there a way to overcome this issue to proceed with snapshot creation.

PS : First time I can able to create the snapshot using the same request. After sometime I tried to take the snapshot for the same index, I am getting this error.

Thanks

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [March 22, 2021, 1:44am UTC](https://discuss.elastic.co/t/indices-dont-have-primary-shards-while-taking-snapshot/267619/2 "2021-03-22T01:44:22Z")

</div>

I think you need to wait until it is at the `open` status before it'll allow a snapshot.

---

<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 19, 2021, 1:44am UTC](https://discuss.elastic.co/t/indices-dont-have-primary-shards-while-taking-snapshot/267619/3 "2021-04-19T01:44:32Z")

</div>

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