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

**URL:** <https://discuss.elastic.co/t/do-i-need-to-remove-old-yml-file-while-upgrading-elasticsearch/118369>\
**Category:** Elasticsearch\
**Created:** [February 4, 2018, 8:19pm UTC](https://discuss.elastic.co/t/do-i-need-to-remove-old-yml-file-while-upgrading-elasticsearch/118369 "2018-02-04T20:19:05Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![amruth](https://avatars.discourse-cdn.com/v4/letter/a/43a26b/32.png) [@amruth](https://discuss.elastic.co/u/amruth)\
**Post date:** [February 4, 2018, 8:19pm UTC](https://discuss.elastic.co/t/do-i-need-to-remove-old-yml-file-while-upgrading-elasticsearch/118369/1 "2018-02-04T20:19:05Z")

</div>

Hi,

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?

Thanks

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [February 4, 2018, 11:05pm UTC](https://discuss.elastic.co/t/do-i-need-to-remove-old-yml-file-while-upgrading-elasticsearch/118369/2 "2018-02-04T23:05:39Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![amruth](https://avatars.discourse-cdn.com/v4/letter/a/43a26b/32.png) [@amruth](https://discuss.elastic.co/u/amruth)\
**Post date:** [February 4, 2018, 11:33pm UTC](https://discuss.elastic.co/t/do-i-need-to-remove-old-yml-file-while-upgrading-elasticsearch/118369/3 "2018-02-04T23:33:36Z")

</div>

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.

Thanks

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [February 4, 2018, 11:39pm UTC](https://discuss.elastic.co/t/do-i-need-to-remove-old-yml-file-while-upgrading-elasticsearch/118369/4 "2018-02-04T23:39:31Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![amruth](https://avatars.discourse-cdn.com/v4/letter/a/43a26b/32.png) [@amruth](https://discuss.elastic.co/u/amruth)\
**Post date:** [February 4, 2018, 11:45pm UTC](https://discuss.elastic.co/t/do-i-need-to-remove-old-yml-file-while-upgrading-elasticsearch/118369/5 "2018-02-04T23:45:22Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [February 4, 2018, 11:49pm UTC](https://discuss.elastic.co/t/do-i-need-to-remove-old-yml-file-while-upgrading-elasticsearch/118369/6 "2018-02-04T23:49:42Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![amruth](https://avatars.discourse-cdn.com/v4/letter/a/43a26b/32.png) [@amruth](https://discuss.elastic.co/u/amruth)\
**Post date:** [February 4, 2018, 11:52pm UTC](https://discuss.elastic.co/t/do-i-need-to-remove-old-yml-file-while-upgrading-elasticsearch/118369/7 "2018-02-04T23:52:03Z")

</div>

Go it. Thanks Mark.

---

<div class="post-metadata">

**Author:** ![amruth](https://avatars.discourse-cdn.com/v4/letter/a/43a26b/32.png) [@amruth](https://discuss.elastic.co/u/amruth)\
**Post date:** [February 5, 2018, 2:02am UTC](https://discuss.elastic.co/t/do-i-need-to-remove-old-yml-file-while-upgrading-elasticsearch/118369/8 "2018-02-05T02:02:05Z")

</div>

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.

Thanks

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [February 5, 2018, 2:12am UTC](https://discuss.elastic.co/t/do-i-need-to-remove-old-yml-file-while-upgrading-elasticsearch/118369/9 "2018-02-05T02:12:29Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![amruth](https://avatars.discourse-cdn.com/v4/letter/a/43a26b/32.png) [@amruth](https://discuss.elastic.co/u/amruth)\
**Post date:** [February 5, 2018, 2:21am UTC](https://discuss.elastic.co/t/do-i-need-to-remove-old-yml-file-while-upgrading-elasticsearch/118369/10 "2018-02-05T02:21:54Z")

</div>

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)?

---

<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:** [March 5, 2018, 2:22am UTC](https://discuss.elastic.co/t/do-i-need-to-remove-old-yml-file-while-upgrading-elasticsearch/118369/11 "2018-03-05T02:22:25Z")

</div>

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