Updating OpenSearch

Hello,

I’m fairly new to all of this but this might still be the dumbest question ever: How do I update OpenSearch to a newer Version? I’m not running it as a Service so I can’t refer to this:

Furthermore wouldn’t just downloading and installing the new version overwrite my current settings of ram dedication, .yml files, security plugins, etc.? I could not find any documentation on it that’s why I’m asking it here.
I have OpenSearch and OpenSearch Dashboards installed on a cluster in a CentOS8 VM environment using tarball and yum if that helps.
Would appreciate any help, even if it is obvious, thanks!

1 Like

@xipuro - you’re not crazy … upgrading is one of the challenges in using the tarball distribution.

My process for updating OpenSearch goes like this:

  1. Unpack the new OpenSEarch alongside the old one
  2. compare the configuration file to see if there are any format/content differences that need to be accommodated
  3. copy the configuration files (opensearch.yml and any jvm.options.d/* files) to the new config directory
  4. copy the certificates over to the same place in the new tree

At this point you have two choices: you can edit the config files in the new tree so that the paths to the certificates point to the right directories, OR use a symlink. I have my install in /opt, so it would look like this:

cd /opt
ln -s opensearch-1.2.3 opensearch

That way, you can make all the paths in your config files point to /opt/opensearch/config/xxx.crt and you’ll never have to edit the config files to adjust your paths; you just change the symlink when you upgrade and then restart. Once you have the certificate paths set up (or your symlink set up), you stop the old opensearch and start the new one.

@xipuro, Adding to what @DrEdWilliams mentioned above, you can perform a snapshot to the old version and restore it in the new version.

You can also do a rolling upgrade as described here Upgrade from Elasticsearch OSS to OpenSearch - OpenSearch documentation