Upgrading OpenSearchServer
Upgrading OpenSearchServer to a newer version is a quick and easy process.
Backing up your data
Before upgrading OpenSearchServer it is strongly recommended to back up all your data. To do so, locate the data
folder used by OpenSearchServer. This is the folder where all indexes and settings are stored.
The location of this folder is written in the start.bat
script (used on Windows) or start.sh
, on the set OPENSEARCHSERVER_DATA=%cd%\data
or OPENSEARCHSERVER_DATA=data
line. Generally, the data
folder is located in the root folder wherein the .zip
or .tar.gz
was uncompressed.
If using the Debian package you will find the location of the data
folder in the file /etc/opensearchserver
. Location is defined in the OPENSEARCHSERVER_DATA
variable. The default value in the Debian package is /var/lib/opensearchserver/data
.
To actually make your backup, stop OpenSearchServer then simply copy the whole data
folder to a safe location.
Upgrading OpenSearchServer
Upgrading a default install
If OpenSearchServer was installed by uncompressing a .zip
or .tar.gz
file, upgrading simply consists in replacing the existing .war
with the new one.
To do so:
- stop OpenSearchServer
- in the root folder wherein OpenSearchServer was uncompressed, open the
server/webapps
subfolder - rename the
ROOT.war
file toROOT.war.backup
to create a backup of the existing version - delete the
server/webapps/ROOT
folder - download the
.war
file for the new version - copy it into the
server/webapps
folder - rename the new
.war
file toROOT.war
- start OpenSearchServer
OpenSearchServer is now upgraded! You can verify by checking the version number at the top of the interface.
It is recommended to first test a new version of OpenSearchServer on a test server, using your data. To do so you can make a fresh install of OpenSearchServer and copy your data there:
- download the
.zip
or.tar.gz
package - uncompress it on your test server
- copy your data from your current
data
folder to thedata
folder of this fresh install - start your test version of OpenSearchServer
- check the behaviour of this new version before actually upgrading your production environment.
Restoring a previous version of OSS
If you notice irregularities after upgrading you can restore a previous version of the software. Since some versions of OpenSearchServer modify the index, you may also need to restore your data.
To resume running an older version follow the upgrading steps above -- but with your backup .war
file (ROOT.war.backup
) being the one that becomes active.
Upgrading a Debian package
To update a version of OpenSearchServer installed with a Debian package:
- stop OpenSearchServer
- download the new
.deb
file and run thedpkg -i <downloaded_package.deb>
command - start OpenSearchServer