# Upgrading elasticsearch version

**URL:** <https://discuss.elastic.co/t/upgrading-elasticsearch-version/68029>\
**Category:** Elasticsearch\
**Created:** [December 5, 2016, 11:20am UTC](https://discuss.elastic.co/t/upgrading-elasticsearch-version/68029 "2016-12-05T11:20:03Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Niteesh](https://avatars.discourse-cdn.com/v4/letter/n/c67d28/32.png) [@Niteesh](https://discuss.elastic.co/u/Niteesh)\
**Post date:** [December 5, 2016, 11:20am UTC](https://discuss.elastic.co/t/upgrading-elasticsearch-version/68029/1 "2016-12-05T11:20:03Z")

</div>

Hi guys,  
I'm using elasticsearch 2.2.0 version currently. now i want to upgrade it to 5.0  
I tried some basic concepts, it is not working.  
can you guys help me about that

thanks in advance

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [December 5, 2016, 11:33am UTC](https://discuss.elastic.co/t/upgrading-elasticsearch-version/68029/2 "2016-12-05T11:33:04Z")

</div>

Yes.

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [December 5, 2016, 11:37am UTC](https://discuss.elastic.co/t/upgrading-elasticsearch-version/68029/3 "2016-12-05T11:37:56Z")

</div>

Have you [read this](https://www.elastic.co/guide/en/elasticsearch/reference/current/setup-upgrade.html) and used the migration plugin? What is not working?

---

<div class="post-metadata">

**Author:** ![nugusbayevkk](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nugusbayevkk/32/126683_2.png) [@nugusbayevkk](https://discuss.elastic.co/u/nugusbayevkk)\
**Post date:** [December 5, 2016, 12:24pm UTC](https://discuss.elastic.co/t/upgrading-elasticsearch-version/68029/4 "2016-12-05T12:24:42Z")

</div>

i will plan in near time update ELK.  
I have 2 node in my cluster and have the follow plan, there 2 apache tomcat server which accept any post queries and then my app wrote to ELK:

1. shutdown app 1 and elk on first node
2. run ELk(updated 5.0.2) on 1 server
3. copy all data(cp in linux) from /data/OLD\_CLUSTERNAME directory of ELK 2v to /data/NEW\_CLUSTERNAME
4. run ELK 5v and APP on server1
5. Shutdown ELK2 and APP2
6. make 2-3 steps in server2

after my future test, i will write result to this Issue.

---

<div class="post-metadata">

**Author:** ![nugusbayevkk](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nugusbayevkk/32/126683_2.png) [@nugusbayevkk](https://discuss.elastic.co/u/nugusbayevkk)\
**Post date:** [December 21, 2016, 7:49am UTC](https://discuss.elastic.co/t/upgrading-elasticsearch-version/68029/5 "2016-12-21T07:49:54Z")

</div>

I have done my migrate:  
there is a plan of my action:

**prerequisites**

- Check java verison in both server It should be same. And jdk 8 `
 [event_manager@event-handler-t ~]$ java -version
java version "1.8.0_101"
Java(TM) SE Runtime Environment (build 1.8.0_101-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.101-b13, mixed mode)`
- Check params on linux serveer: `
cat /etc/sysctl.conf
vm.swappiness = 0
vm.max_map_count=262144
` after configure it, run (for commit) `sysctl -p ` check file /etc/security/limits.conf `
cat /etc/security/limits.conf
your_user_name soft nofile 65536
your_user_name hard nofile 131072
`
- Check that your disk have enough space

**Steps of migration** i have 2 server(server1(it have master1, data1), server2- it have master2 and data2) with running on both tomcat server. 
- Configure new cluster **server1- master1** `
node.name: node-2
node.master: true
node.data: false 
path.logs: /data/logs/elasticsearch5/node1
network.publish_host: server1
network.bind_host: 0.0.0.0
http.port: 9212
discovery.zen.ping.unicast.hosts: ["127.0.0.1", "localhost","server1","server2"]`
**server1- data1** `
node.name: node-2
node.master: true
node.data: false 
path.logs: /data/logs/elasticsearch5/node2
network.publish_host: server1
network.bind_host: 0.0.0.0
http.port: 9213
discovery.zen.ping.unicast.hosts: ["127.0.0.1", "localhost","server1","server2"]` and analog config for second server2.- Then kill elasticsearch process on server1
- Copy data from OLD\_directory\_OF\_MASTER1 to NEW\_directory\_of\_MASTER1, and analog with DATA1 node `cp -r /data/db/elasticsearch-2.3.4-node1/data/eventhandler-main-db/nodes /data/db/elasticsearch-5.0.2-node1/data
cp -r /data/db/elasticsearch-2.3.4-node2/data/eventhandler-main-db/nodes /data/db/elasticsearch-5.0.2-node2/data
`
- Run new nodes: master1, data1
And it accept success all shards and indices from old ELK(in my case -2.3.4) At same time all users of application work with SERVER2.- Check your templates, nodes status and indices
`curl localhost:9212/_template/
curl localhost:9212/_cat/nodes?v
curl localhost:9212/_cat/indices?v`- if all OK, then i run tomcat server, and load balancer after check that my server available begin send data to server1
all data, which appeared in server2(old cluster) stored there and they didn't lost and now we begin similar actions on server2- new data now stored in new cluster and after configurate and run new nodes of server2 data by replica fron server 1 migrate to server2 and old data from server2 migrate to server1(which appear in migrate time on server1)
In my case this method is suitable. But he have limitations. User can lost their data for migration time.

---

<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 18, 2017, 7:50am UTC](https://discuss.elastic.co/t/upgrading-elasticsearch-version/68029/6 "2017-01-18T07:50:38Z")

</div>

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