Version Upgradation in Elasticsearch from 2.x to 5.x

Hi Team,

I have upgraded Elasticsearch Version from 2.x to 5.x.
But the data path in old version is : data/elasticsearchCluster/nodes/0/indices, and that of new new version is : data/nodes/0/indices

How can I copy the indices from Old version to new one..since the new version has additional feature like encryption.

Note:- "path.data" in both cases is set to : /elasticsearch_home/data

Thanks,

Gayathri

Elasticsearch upgrades what is needed. You don't need to touch physical directories.

How Can I migrate the existing indeces to latest version.
When I copied the data folder, I got error an message like :data/elasticsearchCluster/nodes/0/indices location is not writable.....

Check your permissions.

yes, I It had 775 permission..
I have deleted the data folder from V5 directory and restarted again.. and now new index is created on location :
data/nodes/0/indices..

I want my existing indeces to be added to the latest version...

Do you mean that you removed all existing data?

But if you removed them how can you get them back?

Did you read https://www.elastic.co/guide/en/elasticsearch/reference/5.2/setup-upgrade.html?

Worse case, you can reindex in a new 5.0 cluster from an old 2.x cluster with: https://www.elastic.co/guide/en/elasticsearch/reference/5.2/reindex-upgrade.html

As I said in the previous post, I have copied the data folder from old version.
While starting the elasticsearch I was getting "location is not writable....." error message..

[
default index path in old version is : data/elasticsearchCluster/nodes/0/indices, and that of new version is : data/nodes/0/indices
]

So I deleted the data folder, and tried to restart the elasticsearch, then the error gone and new index created on path:data/nodes/0/indices..

I have back up of my indeces on my old version's folder...PFB, the directory structure:

[root@localhost elasticsearch]# ls -l
total 32268
drwxrwxr-x 3 elasticsearch elasticsearch 4096 Jan 11 02:24 backup
drwxrwxr-x 9 elasticsearch elasticsearch 4096 Jan 11 22:38 elasticsearch-2.3.3
drwxrwxr-x 10 elasticsearch elasticsearch 4096 Feb 20 01:57 elasticsearch-5.0.2
-rwxrwxr-x 1 elasticsearch elasticsearch 18012 Aug 9 2016 hs_err_pid32532.log
[root@localhost elasticsearch]#

While starting the elasticsearch I was getting "location is not writable....." error message

It means that you don't have the write permissions on the data folder and/or one of its subfolders/files for the user who is running elasticsearch.

This is what you have to fix before doing anything else.

BTW why upgrading to 5.0 instead of 5.2.2?

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