# Restore snapshot from ES 2.4 to ES 5.2

**URL:** https://discuss.elastic.co/t/restore-snapshot-from-es-2-4-to-es-5-2/85202
**Category:** Elasticsearch
**Created:** [May 10, 2017, 8:20am UTC](https://discuss.elastic.co/t/restore-snapshot-from-es-2-4-to-es-5-2/85202 "2017-05-10T08:20:40Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![living\_jordi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/living_jordi/32/61363_2.png) [@living\_jordi](https://discuss.elastic.co/u/living_jordi)
#### Post date: [May 10, 2017, 8:20am UTC](https://discuss.elastic.co/t/restore-snapshot-from-es-2-4-to-es-5-2/85202/1 "2017-05-10T08:20:40Z")

</div>

I've made snapshot on a repository using ES 2.4.

I need to restore the last one on an ES 5.2 instance.

I've read some issues related with `index-N` I don't quite figure out what's it for.

By now, I'm now able to restore the last snapshot. When I list the available snapshot into repository only shows me one (I don't know whether it's the last or the first one).

How could I restore the last snapshot created by a ES 2.4 instance into an ES 5.2 instance?

Thanks.

---

<div class="post-metadata">

### Author: ![abeyad](https://avatars.discourse-cdn.com/v4/letter/a/278dde/32.png) [@abeyad](https://discuss.elastic.co/u/abeyad)
#### Post date: [May 12, 2017, 2:29pm UTC](https://discuss.elastic.co/t/restore-snapshot-from-es-2-4-to-es-5-2/85202/2 "2017-05-12T14:29:51Z")

</div>

Once you connect a 5.x cluster to the same repo that a 2.x cluster is connected to, the 5.x cluster goes through an upgrade process on the file formats. Any subsequent snapshots created by the 2.x cluster will not be seen by the 5.x cluster.

See [https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html) for details on multiple clusters being connected to the same repository.

If you really want to restore the latest snapshot from the 2.x cluster, you will have to:

1. Delete the 5.x repository
2. Delete all of the index-N blobs (but not the `index` blob) from the repository
3. Delete the `index.latest` blob
4. Set the 2.x cluster's repo to `read_only` mode
5. Create the repo on 5.x.
6. Restore the snapshot you want

An untested, unsupported alternative if you want to keep writing snapshots from the 2.x cluster is to do the aforementioned process but create the repo on 5.x with `read_only` set to true. However, its not supported and I'm not sure if it'll work - YMMV

---

<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: [June 9, 2017, 2:36pm UTC](https://discuss.elastic.co/t/restore-snapshot-from-es-2-4-to-es-5-2/85202/3 "2017-06-09T14:36:59Z")

</div>

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