# Restore Shards from Snapshot

**URL:** <https://discuss.elastic.co/t/restore-shards-from-snapshot/28491>\
**Category:** Elasticsearch\
**Created:** [September 2, 2015, 6:59am UTC](https://discuss.elastic.co/t/restore-shards-from-snapshot/28491 "2015-09-02T06:59:37Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![skumar](https://avatars.discourse-cdn.com/v4/letter/s/e9c0ed/32.png) [@skumar](https://discuss.elastic.co/u/skumar)\
**Post date:** [September 2, 2015, 6:59am UTC](https://discuss.elastic.co/t/restore-shards-from-snapshot/28491/1 "2015-09-02T06:59:37Z")

</div>

Hi All,  
Suppose , I created an index and this is assigned to two nodes(assume) node n1 and node n2 in a cluster . Each node has two primary shards and two replica shards.Snapshot of this index is taken at t1 and somehow node n1 goes down after snapshot has been taken . Restoring whole index is easy to do but my question is can we restore only those shards which were in node n1 . If yes , how can we do that?

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:** [September 2, 2015, 7:24am UTC](https://discuss.elastic.co/t/restore-shards-from-snapshot/28491/2 "2015-09-02T07:24:34Z")

</div>

You currently cannot do this.

However if you have replicas, what's the problem? They should cover loss of the primary.

---

<div class="post-metadata">

**Author:** ![skumar](https://avatars.discourse-cdn.com/v4/letter/s/e9c0ed/32.png) [@skumar](https://discuss.elastic.co/u/skumar)\
**Post date:** [September 2, 2015, 8:58am UTC](https://discuss.elastic.co/t/restore-shards-from-snapshot/28491/3 "2015-09-02T08:58:05Z")

</div>

Thanks warkolm for your reply.  
Can you tell me what basically happens behind the scene when we operate snapshot API and restore API.what process they start doing on index once we invoke these APIs.  
Which java classes from elasticsearch 1.7.1 jar should I go through to understand in and out of how snapshot and restore works.

thanks

---

<div class="post-metadata">

**Author:** ![VincentBiret](https://avatars.discourse-cdn.com/v4/letter/v/54ee81/32.png) [@VincentBiret](https://discuss.elastic.co/u/VincentBiret)\
**Post date:** [September 2, 2015, 1:10pm UTC](https://discuss.elastic.co/t/restore-shards-from-snapshot/28491/4 "2015-09-02T13:10:02Z")

</div>

> **[elastic/elasticsearch-definitive-guide](https://github.com/elastic/elasticsearch-definitive-guide)**
>
> elasticsearch-definitive-guide - The Definitive Guide to Elasticsearch

[Life inside a shard] is a really good chapter,

You should also look for Snapshot & Restore API, pages 600 & 659 of the book

---

<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:** [September 2, 2015, 9:18pm UTC](https://discuss.elastic.co/t/restore-shards-from-snapshot/28491/5 "2015-09-02T21:18:11Z")

</div>

The Definitive Guide is also here [https://www.elastic.co/guide/en/elasticsearch/guide/current/index.html](https://www.elastic.co/guide/en/elasticsearch/guide/current/index.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:** [July 5, 2017, 11:52pm UTC](https://discuss.elastic.co/t/restore-shards-from-snapshot/28491/6 "2017-07-05T23:52:29Z")

</div>


