How to update elasticsearch


(Rubish Gupta) #1

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.


(Shay Banon) #2

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.comwrote:

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.


(Rubish Gupta) #3

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 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> 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.


(Shay Banon) #4

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.comwrote:

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 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> 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.


(system) #5