# Es5.1 - restore snapshot from es2.4

**URL:** https://discuss.elastic.co/t/es5-1-restore-snapshot-from-es2-4/69712
**Category:** Elasticsearch
**Created:** [December 21, 2016, 9:13pm UTC](https://discuss.elastic.co/t/es5-1-restore-snapshot-from-es2-4/69712 "2016-12-21T21:13:12Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Guillaume\_Vachon](https://avatars.discourse-cdn.com/v4/letter/g/a698b9/32.png) [@Guillaume\_Vachon](https://discuss.elastic.co/u/Guillaume_Vachon)
#### Post date: [December 21, 2016, 9:13pm UTC](https://discuss.elastic.co/t/es5-1-restore-snapshot-from-es2-4/69712/1 "2016-12-21T21:13:12Z")

</div>

Hi all,

Yesterday i created a small 3 node cluster that is 5.1. I wanted to start testing a few things. Among those thing was to use the s3-repository plugin to access my S3 snapshot from my in production 2.4 cluster. Yesterday when I reached that point I only had the time to list all snapshot which worked fine.

Last night curator came through and delete snapshot from 1 year ago 2015122

This morning, I tried to list the snapshot again because I wanted to go ahead and do a restore. Listing the snapshot now fails.

{  
"error" : {  
"root\_cause" : [  
{  
"type" : "snapshot\_missing\_exception",  
"reason" : "[prod-backup:curator-20151222054502/curator-20151222054502] is missing"  
}  
],  
"type" : "snapshot\_exception",  
"reason" : "[prod-backup:curator-20151222054502/curator-20151222054502] Snapshot could not be read",  
"caused\_by" : {  
"type" : "snapshot\_missing\_exception",  
"reason" : "[prod-backup:curator-20151222054502/curator-20151222054502] is missing",  
"caused\_by" : {  
"type" : "no\_such\_file\_exception",  
"reason" : "Blob object [snap-curator-20151222054502.dat] not found: The specified key does not exist. (Service: Amazon S3; Status Code: 404; Error Code: NoSuchKey; Request ID: 4AC6D60C40E0CED1)"  
}  
}  
},  
"status" : 500  
}

I don't understand why  
Thanks in advance!

---

<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: [December 21, 2016, 9:44pm UTC](https://discuss.elastic.co/t/es5-1-restore-snapshot-from-es2-4/69712/2 "2016-12-21T21:44:44Z")

</div>

Hello,

This is an issue with having both a 2.x and 5.x cluster connected to the same repository and deleting a snapshot in the repository. In 5.x, we upgraded our file formats to use a generational format (you will notice in your S3 repository blob's by the name `index-N` where N is an incrementing number). The side effect of this is, when you delete a snapshot in 2.x, it will only update the `index` file, not the latest `index-N` file which 5.x understands, so according to your 5.x cluster, it still believes the snapshot is there (because the snapshot still exists in the `index-N` file), then when it goes to look for the data for that snapshot, it doesn't find it, because the 2.x cluster's delete operation wiped out that snapshot's data from the repository.

What we advise is that when you have two clusters of different versions pointing to the same repository, only write to the repository from the higher version number. The lower versioned cluster can still access the repository but should do so in a `read-only` fashion. Alternatively, in your setup where 2.x is your production cluster, you can create a 5.x cluster pointing to the same repository, but then you cannot execute snapshot deletions safely.

Also, note that once you are finished experimenting with the 5.x cluster, you should delete all `index-N` blob (but _not_ the `index` blob) in your S3 repository. That way, the next time you connect a 5.x cluster to it (presumably to upgrade your ES cluster), then it will generate new index-N blobs from the current `index` file of 2.x, so it will retrieve all the latest snapshot data from 2.x. Right now, any snapshot writes from the 2.x cluster will not be seen by the 5.x cluster.

Hope this helps.

Ali

---

<div class="post-metadata">

### Author: ![Guillaume\_Vachon](https://avatars.discourse-cdn.com/v4/letter/g/a698b9/32.png) [@Guillaume\_Vachon](https://discuss.elastic.co/u/Guillaume_Vachon)
#### Post date: [December 22, 2016, 2:10pm UTC](https://discuss.elastic.co/t/es5-1-restore-snapshot-from-es2-4/69712/3 "2016-12-22T14:10:00Z")

</div>

Wow that is an awesome answer!  
Thanks a lot for your time and help!

This just made my day.  
Have a great day to you.

---

<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: [January 19, 2017, 2:10pm UTC](https://discuss.elastic.co/t/es5-1-restore-snapshot-from-es2-4/69712/4 "2017-01-19T14:10:06Z")

</div>

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