# Snapshot restore not restoring the missing shards

**URL:** https://discuss.elastic.co/t/snapshot-restore-not-restoring-the-missing-shards/16226
**Category:** Elasticsearch
**Created:** [March 7, 2014, 12:39pm UTC](https://discuss.elastic.co/t/snapshot-restore-not-restoring-the-missing-shards/16226 "2014-03-07T12:39:46Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Hari\_Prasad](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hari_prasad/32/56784_2.png) [@Hari\_Prasad](https://discuss.elastic.co/u/Hari_Prasad)
#### Post date: [March 7, 2014, 12:39pm UTC](https://discuss.elastic.co/t/snapshot-restore-not-restoring-the-missing-shards/16226/1 "2014-03-07T12:39:46Z")

</div>

Hi  
I am trying out the elasticsearch 1.0's snapshot and restore feature.  
My doubt is when the restore operation is performed will the missing  
shards, those available when snapshot was taken, restored?

When i tried this the missing shards were not restored. So does the restore  
assumes all the shards are available and just restore the records?

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/66a7b177-6ec8-4fbf-a3db-1a9d0ce04647%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/66a7b177-6ec8-4fbf-a3db-1a9d0ce04647%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![Binh\_Ly\_2](https://avatars.discourse-cdn.com/v4/letter/b/d07c76/32.png) [@Binh\_Ly\_2](https://discuss.elastic.co/u/Binh_Ly_2)
#### Post date: [March 7, 2014, 3:28pm UTC](https://discuss.elastic.co/t/snapshot-restore-not-restoring-the-missing-shards/16226/2 "2014-03-07T15:28:15Z")

</div>

You can restore an index if it doesn't currently exist. If it currently  
exists, it must have the same shard count as when you ran the snapshot, and  
in this case, restore will replace your data in the index to the state of  
the specific snapshot that you choose to restore.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/b6d6fed4-aa2c-4861-b618-83e8562cf7f9%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/b6d6fed4-aa2c-4861-b618-83e8562cf7f9%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![Hari\_Prasad](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hari_prasad/32/56784_2.png) [@Hari\_Prasad](https://discuss.elastic.co/u/Hari_Prasad)
#### Post date: [March 11, 2014, 10:38am UTC](https://discuss.elastic.co/t/snapshot-restore-not-restoring-the-missing-shards/16226/3 "2014-03-11T10:38:00Z")

</div>

Thank you Binh Ly.  
But i am correct to say a restore process should also restore missing  
shards. Because in a case where if some shards are missing and restore  
didn't help?

On Friday, 7 March 2014 20:58:15 UTC+5:30, Binh Ly wrote:

> You can restore an index if it doesn't currently exist. If it currently  
> exists, it must have the same shard count as when you ran the snapshot, and  
> in this case, restore will replace your data in the index to the state of  
> the specific snapshot that you choose to restore.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/53ee2707-59fc-4dee-9cba-a86a6a701d81%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/53ee2707-59fc-4dee-9cba-a86a6a701d81%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![Binh\_Ly\_2](https://avatars.discourse-cdn.com/v4/letter/b/d07c76/32.png) [@Binh\_Ly\_2](https://discuss.elastic.co/u/Binh_Ly_2)
#### Post date: [March 11, 2014, 5:40pm UTC](https://discuss.elastic.co/t/snapshot-restore-not-restoring-the-missing-shards/16226/4 "2014-03-11T17:40:43Z")

</div>

As long as you have the same shard count as the backup and all the shards  
are allocated, the restore will work properly. If you have a missing shard  
(i.e. you deleted the underlying fs directory) and it is not currently  
allocated, you can allocate it first using cluster reroute:

[http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/cluster-reroute.html](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/cluster-reroute.html)

And then once it is allocated, the restore will work properly.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/30929be4-ffaf-473e-b5d3-e0a0d7495596%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/30929be4-ffaf-473e-b5d3-e0a0d7495596%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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: [July 6, 2017, 1:44am UTC](https://discuss.elastic.co/t/snapshot-restore-not-restoring-the-missing-shards/16226/5 "2017-07-06T01:44:09Z")

</div>


