How to upgrade from Elastic Stack 8 to 9.1?

Hello

There isnt a clear guide (like other versions) on how to upgrade from Elastic Stack 8 (8.18) to Elastic Stack 9 (9.1).

What is the best procedure on doing this? Im using Debian and I rather do it all thru apt-get

Thanks

The official upgrade guide is here: Upgrade your deployment or cluster | Elastic Docs

It says nothing about what to add in sources.list in debian to upgrade 8.x to 9.1

Just by coincidence did that upgrade today.

$ sudo systemctl stop elasticsearch
$ sudo mv /etc/apt/sources.list.d/elastic-8.x.list /etc/apt/sources.list.d/elastic-9.x.list
$ sudo vi /etc/apt/sources.list.d/elastic-9.x.list
$ sudo cat /etc/apt/sources.list.d/elastic-9.x.list
deb [signed-by=/usr/share/keyrings/elasticsearch-keyring.gpg] https://artifacts.elastic.co/packages/9.x/apt stable main
# I changed /8.x/ to /9.x/, renamed file just for clarity
$ sudo apt update
$ sudo apt upgrade
$ sudo systemctl start elasticsearch

rolling upgrade, data nodes first, then my 3 masters.

I was on 8.18.1 before, one should be on 8.latest before going to 9.something

Also dont forget to check the Upgrade Assistant before upgrading.

$ sudo mv /etc/apt/sources.list.d/elastic-8.x.list /etc/apt/sources.list.d/elastic-9.x.list

OK, so you just killed the 8.x repo and made the 9.x repo.....And upgraded like that....

That note (upgrading from 8 to 9) should be included in the doc and how to do it exactly.

Also its a all-in-one node: Has Elastic, Kibana, Logstash, Beats, etc...