# ES Snapshots giving error

**URL:** <https://discuss.elastic.co/t/es-snapshots-giving-error/99105>\
**Category:** Elasticsearch\
**Created:** [September 1, 2017, 9:14am UTC](https://discuss.elastic.co/t/es-snapshots-giving-error/99105 "2017-09-01T09:14:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vivek\_Samaga](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vivek_samaga/32/43285_2.png) [@Vivek\_Samaga](https://discuss.elastic.co/u/Vivek_Samaga)\
**Post date:** [September 1, 2017, 9:14am UTC](https://discuss.elastic.co/t/es-snapshots-giving-error/99105/1 "2017-09-01T09:14:14Z")

</div>

Am able to successfully register snapshot with the below request.

```
PUT /_snapshot/my_backup
{
    "type": "fs",
    "settings": {
        "location": "/elk_bak/esback",
        "compress": true
    }
}

```

But now am facing the issue `Indices don't have primary shards` error when i run

`PUT /_snapshot/my_backup/snapshot_1?wait_for_completion=true`

```
  {
    "index": "logstash-2017.07.02",
    "shard_id": 0,
    "reason": "primary shard is not allocated",
    "status": "INTERNAL_SERVER_ERROR"
  },
  {
    "index": "logstash-2017.07.02",
    "shard_id": 1,
    "reason": "primary shard is not allocated",
    "status": "INTERNAL_SERVER_ERROR"
  },
```

---

<div class="post-metadata">

**Author:** ![thiago](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thiago/32/32096_2.png) [@thiago](https://discuss.elastic.co/u/thiago)\
**Post date:** [September 2, 2017, 1:36pm UTC](https://discuss.elastic.co/t/es-snapshots-giving-error/99105/2 "2017-09-02T13:36:25Z")

</div>

Your cluster health is probably in a red state because a couple of primary shards of index `logstash-2017.07.02` are not available (depending on the problem, part of that index might be gone for good).

You can check what's going on with the [Cluster Allocation Explain API](https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-allocation-explain.html)

---

<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:** [September 30, 2017, 1:36pm UTC](https://discuss.elastic.co/t/es-snapshots-giving-error/99105/3 "2017-09-30T13:36:30Z")

</div>

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