Not able to restore snap shot from 5.6.3 to 7.4.2 elastic search

Hello ,

Actually i have installed 5.6.3 elasticsearch and created some indexes not i want to install new version of elastic search 7.4.2 so in that case i followed below steps

1.Take backup by creating snap shot for 5.6.3 version.
2.Now install 6.6.2 and restore these snapshots which i have created in 5.6.3.
3.Then again uninstall 6.6.2 and install 7.4.2 but while restoring these snapshot then it is showing the below result

The index [[cielasticsearch_1_report_1_2-2020.03.28-16.29-1/o3PhNL-pQkKus0ITj0BFHw]] was created with version [5.6.3] but the minimum compatible version is [6.0.0-beta1]. It should be re-indexed in Elasticsearch 6.x before upgrading to 7.4.2

Could you please help me out how to do this .....

Hi @abhishek1

as the error message points out, you won't be able to restore a 5.x snapshot on 7.x.
If you want to migrate the data from 5.x to 7.x, you will have to restore the snapshot on a 5.x or 6.x cluster first and then reindex it into your 7.x cluster.
See documentation for the reindex API for details.

Hi,
Thanks for reply,
i just wanted to know the process like i have mnetioned below when i will do reindex after taking snapshot or before since i am not too much familiar with this so .
Could you please tell me because i did some thing

1.First i took a snapshot for 5.6.3.
2.Then simply i restore this snap shot in 6.6.2 then in 6.6.2 it is showing all indices .
3.But after that when i am going to do the same for 7.4.2 on that time i am getting error.
Note: for reindexing the index name will change right ...

Thanks,

Abhishek

Note: for reindexing the index name will change right ...

Only if you reindex from within the same cluster. The easiest solution for you I think would be to simply set up a 7.x cluster. Then reindex from remote into it from the 5.x cluster while keeping the index names the same.

You could also solve this on the 6.x cluster by:

  1. Reindexing the 5.x indices to different names.
  2. Taking a snapshot from the 6.x cluster
  3. Restoring the snapshot to the 7.x cluster while renaming the indices back to their original names

Both approaches should work fine I think

Hi,
Thanks for reply , i got your approaches whatever you told i have few questions here

1.Reindexing the 5.x indices to different names
That means first i need to reindexing fr 5.X and then take a snap shot and restore in 6.X
2. Then again taking a snap shot from 6.X and restore in 7.X

so you are talking about different cluster it should not create problem just simply taking snap shot and restore .

Could you clarify .

First you'd have to snapshot on 5.x, then restore to 6.x, then reindex the restored indices so that they're on version 6.x (and thus compatible with 7.x).

This would be the workflow with a single cluster. If you have two clusters at your disposal:
Just spin up the 7.x cluster and reindex directly from the 5.x cluster. No need for the snapshot step in that case.

1 Like

Hey Thanks for your reply..
i have followed your steps like below
First you'd have to snapshot on 5.x, then restore to 6.x, then reindex the restored indices so that they're on version 6.x (and thus compatible with 7.x).

Now what is happening .. here
lets say i have index index_1_test_1 after reindexing it name is index_1_test_2 same i have done finally when i reached in 7.X on that i had index name was index_1_test_4 so what i have done i have created another index in 7.X name is same as 5.X (index_1_test_1) and then store all data from index_1_test_4 to index_1_test_1.
So all data has been stored in same name what i had in 5.X.

When i opened my we application on that time i am not able to see data in my application.

Is there anything i missed ..??
Could you please verify once

Did you manually try querying the data in the 7.x cluster? Maybe there's an issue with your web application and 7.x? A quick check would be to make sure the document counts match up between the 5.x and 7.x versions of those indices.

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