# How to update elasticsearch

**URL:** <https://discuss.elastic.co/t/how-to-update-elasticsearch/5258>\
**Category:** Elasticsearch\
**Created:** [August 26, 2011, 2:02pm UTC](https://discuss.elastic.co/t/how-to-update-elasticsearch/5258 "2011-08-26T14:02:49Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rubish\_Gupta](https://avatars.discourse-cdn.com/v4/letter/r/45deac/32.png) [@Rubish\_Gupta](https://discuss.elastic.co/u/Rubish_Gupta)\
**Post date:** [August 26, 2011, 2:02pm UTC](https://discuss.elastic.co/t/how-to-update-elasticsearch/5258/1 "2011-08-26T14:02:49Z")

</div>

How to update elasticsearch. Previously I had version 0.15.2 working both on  
my local system and my production system. I want to upgrade it to the latest  
0.17.6 at the moment.

On my local machine, I did not have any configuration changes. So to update  
I downloaded the elasticsearch.version.tar.gz and ran following command in  
the directory which contained installed elasticsearch directory and the  
downloaded tar:

tar xzvf elasticsearch.version.tar.gz  
cp -r elasticsearch.version/\*\* elasticsearch/

However I noticed that all my data and config files gets overwritten when I  
do this. I also do not have the service wrapper installed on local machine.  
I wanted to test out the update process once on my local machine before  
doing it on production, but I terribly failed at the exercise.

Any pointer from long term users on how do they update elasticsearch and  
what preventive measures should be taken to avoid loosing configuration and  
data are very much welcomed.

Thanks for help.

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [August 26, 2011, 3:05pm UTC](https://discuss.elastic.co/t/how-to-update-elasticsearch/5258/2 "2011-08-26T15:05:37Z")

</div>

What you really care about is the data location, and the conf location. You  
can specify specific file system locations for them, by default they exists  
under the installation under config and data directories.

When you want to install a new version, simply extract it, point it to the  
relevant config and data location, and start it. Or, you can just copy over  
those files to the new version installed.

On Fri, Aug 26, 2011 at 5:02 PM, rubish gupta  
[rubish.gupta@almaconnect.com](mailto:rubish.gupta@almaconnect.com)wrote:

> How to update elasticsearch. Previously I had version 0.15.2 working both  
> on my local system and my production system. I want to upgrade it to the  
> latest 0.17.6 at the moment.
> 
> On my local machine, I did not have any configuration changes. So to update  
> I downloaded the elasticsearch.version.tar.gz and ran following command in  
> the directory which contained installed elasticsearch directory and the  
> downloaded tar:
> 
> tar xzvf elasticsearch.version.tar.gz  
> cp -r elasticsearch.version/\*\* elasticsearch/
> 
> However I noticed that all my data and config files gets overwritten when I  
> do this. I also do not have the service wrapper installed on local machine.  
> I wanted to test out the update process once on my local machine before  
> doing it on production, but I terribly failed at the exercise.
> 
> Any pointer from long term users on how do they update elasticsearch and  
> what preventive measures should be taken to avoid loosing configuration and  
> data are very much welcomed.
> 
> Thanks for help.

---

<div class="post-metadata">

**Author:** ![Rubish\_Gupta](https://avatars.discourse-cdn.com/v4/letter/r/45deac/32.png) [@Rubish\_Gupta](https://discuss.elastic.co/u/Rubish_Gupta)\
**Post date:** [August 26, 2011, 10:16pm UTC](https://discuss.elastic.co/t/how-to-update-elasticsearch/5258/3 "2011-08-26T22:16:52Z")

</div>

Thanks for the info, that was very helpful. ES 0.15.2 config file had no  
mention of them, so was not aware of any such config settings.

If I configure the data directory in config, will it work with older data,  
if I just copy the data directory to the configured path? or would I need to  
reindex the data. Reindexing is not a problem for me, as my data set is  
pretty small, and can be reindexed in 15-20 mins, but asking just for  
awareness.

Also, are there any updates to service-wrapper as well along with the ES or  
just updating the ES should work?

On Fri, Aug 26, 2011 at 8:35 PM, Shay Banon [kimchy@gmail.com](mailto:kimchy@gmail.com) wrote:

> What you really care about is the data location, and the conf location. You  
> can specify specific file system locations for them, by default they exists  
> under the installation under config and data directories.
> 
> When you want to install a new version, simply extract it, point it to the  
> relevant config and data location, and start it. Or, you can just copy over  
> those files to the new version installed.
> 
> On Fri, Aug 26, 2011 at 5:02 PM, rubish gupta \<  
> [rubish.gupta@almaconnect.com](mailto:rubish.gupta@almaconnect.com)\> wrote:
> 
> > How to update elasticsearch. Previously I had version 0.15.2 working both  
> > on my local system and my production system. I want to upgrade it to the  
> > latest 0.17.6 at the moment.
> > 
> > On my local machine, I did not have any configuration changes. So to  
> > update I downloaded the elasticsearch.version.tar.gz and ran following  
> > command in the directory which contained installed elasticsearch directory  
> > and the downloaded tar:
> > 
> > tar xzvf elasticsearch.version.tar.gz  
> > cp -r elasticsearch.version/\*\* elasticsearch/
> > 
> > However I noticed that all my data and config files gets overwritten when  
> > I do this. I also do not have the service wrapper installed on local  
> > machine. I wanted to test out the update process once on my local machine  
> > before doing it on production, but I terribly failed at the exercise.
> > 
> > Any pointer from long term users on how do they update elasticsearch and  
> > what preventive measures should be taken to avoid loosing configuration and  
> > data are very much welcomed.
> > 
> > Thanks for help.

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [August 29, 2011, 5:55pm UTC](https://discuss.elastic.co/t/how-to-update-elasticsearch/5258/4 "2011-08-29T17:55:05Z")

</div>

You mean if upgrading from 0.15 to 0.17 requires reindexing of the data? No,  
it doesn't require it.

On Sat, Aug 27, 2011 at 1:16 AM, rubish gupta  
[rubish.gupta@almaconnect.com](mailto:rubish.gupta@almaconnect.com)wrote:

> Thanks for the info, that was very helpful. ES 0.15.2 config file had no  
> mention of them, so was not aware of any such config settings.
> 
> If I configure the data directory in config, will it work with older data,  
> if I just copy the data directory to the configured path? or would I need to  
> reindex the data. Reindexing is not a problem for me, as my data set is  
> pretty small, and can be reindexed in 15-20 mins, but asking just for  
> awareness.
> 
> Also, are there any updates to service-wrapper as well along with the ES or  
> just updating the ES should work?
> 
> On Fri, Aug 26, 2011 at 8:35 PM, Shay Banon [kimchy@gmail.com](mailto:kimchy@gmail.com) wrote:
> 
> > What you really care about is the data location, and the conf location.  
> > You can specify specific file system locations for them, by default they  
> > exists under the installation under config and data directories.
> > 
> > When you want to install a new version, simply extract it, point it to the  
> > relevant config and data location, and start it. Or, you can just copy over  
> > those files to the new version installed.
> > 
> > On Fri, Aug 26, 2011 at 5:02 PM, rubish gupta \<  
> > [rubish.gupta@almaconnect.com](mailto:rubish.gupta@almaconnect.com)\> wrote:
> > 
> > > How to update elasticsearch. Previously I had version 0.15.2 working both  
> > > on my local system and my production system. I want to upgrade it to the  
> > > latest 0.17.6 at the moment.
> > > 
> > > On my local machine, I did not have any configuration changes. So to  
> > > update I downloaded the elasticsearch.version.tar.gz and ran following  
> > > command in the directory which contained installed elasticsearch directory  
> > > and the downloaded tar:
> > > 
> > > tar xzvf elasticsearch.version.tar.gz  
> > > cp -r elasticsearch.version/\*\* elasticsearch/
> > > 
> > > However I noticed that all my data and config files gets overwritten when  
> > > I do this. I also do not have the service wrapper installed on local  
> > > machine. I wanted to test out the update process once on my local machine  
> > > before doing it on production, but I terribly failed at the exercise.
> > > 
> > > Any pointer from long term users on how do they update elasticsearch and  
> > > what preventive measures should be taken to avoid loosing configuration and  
> > > data are very much welcomed.
> > > 
> > > Thanks for help.

---

<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:** [July 6, 2017, 3:55am UTC](https://discuss.elastic.co/t/how-to-update-elasticsearch/5258/5 "2017-07-06T03:55:41Z")

</div>


