How to upgrade YugaybteDB to the latest version?

[Question posted by a user on YugabyteDB Community Slack ]

I need to upgrade YugabyteDB to the latest version. How can I ?

You can follow upgrade docs at https://docs.yugabyte.com/latest/manage/upgrade-deployment/.

In general, so far we have always done newer releases in such a way that it is possible to do a rolling/online upgrade of the software, one yb-master at a time and one yb-tserver at a time. It is perfectly ok for the system to be in a hybrid state where some servers are running the older version of the software and some have already been upgraded to the newer version of the software. But, as a best practice, you don’t want to run in this hybrid state with mixed versions for extended periods of time (like days) and limit the hybrid state to the upgrade phase alone.

Typically, your –fs_data_dirs (where YugabyteDB’s data files live) as well as you conf files (if you are passing the gflags from a conf file instead of the command line) are already in a separate location different than the software install directory.

So it is just a matter of starting the yb-master/yb-tserver one at a time from the new software location but reusing all the same configuration options and reusing the data in the –fs_data_dirs.