Do I need to remove old .yml file while upgrading Elasticsearch?

(Amruth) #1


I am trying to upgrade Elasticsearch. Do I need to remove old .yml file while upgrading Elasticsearch to a newer version? In the documentation it is mentioned as -

''Use rpm or dpkg to install the new package. All files should be placed in their proper locations, and config files should not be overwritten.''

I didn't clearly understand this point. Do I need to install the new version and just forget about old Elasticsearch files? Can someone please explain what it means?


(Mark Walkom) #2

It means that there is a new version of the elasticsearch.yml file and it wants to replace the one you have.

You should take a backup if the file and let the upgrade process replace it. Then just backport your changes.

(Amruth) #3

Hi Mark,

Please bear with me. I still didn't get the point. Currently, I am running Elasticsearch 5.5 on Redhat machine and want to upgrade it to Elasticsearch 5.6.

From the answer you gave, what I am assuming is to take the backup of ES 5.5 elasticsearch.yml file and just install ES 5.6(which would replace 5.5 file with 5.6). I don't understand what you mean by backporting changes.


(Mark Walkom) #4

You need to copy the changes you made into the new file once it has updated.

(Amruth) #5

So whatever the 5.5 yml file has should be done in 5.6 yml to work as it used to work with 5.5

(Mark Walkom) #6

Yes. You should just be able to grep for line without comments to get the things you changed, then just put them back in.

(Amruth) #7

Go it. Thanks Mark.

(Amruth) #8

Hi Mark,

I've just upgraded ES 5.5.1 to ES 5.6.7. Even though I didn't edit .yml file, I still see the old settings in the new file. Shouldn't the file be edited manually? Please shed some light on this.


(Mark Walkom) #9

It'll really depend on your OS and the package management system that is being used.

(Amruth) #10

Got you. I am using rpm package manager to upgrade. I think on my OS(Redhat), everything is being taken care of.

And one more question is - I've taken the Snapshot of the cluster and Restore would be needed only if something goes wrong in upgrading ES? Otherwise everything will be taken care of(all the indices in older version is stored in newer version)?

(system) #11

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