Upgrading OpenMRS

This section will help you with upgrading OpenMRS. These are the instructions for manually upgrading OpenMRS.

How it works

There are two parts of your installation that need to be upgraded: the code and your database data.  The code is contained inside the openmrs.war file you download.  The code expects the database to be in a certain format, otherwise it will fail to get certain objects and data out of it.  The code contains a file that lists off all the changes needed to go from one version to the next. If you want to read about the specifics of this, read about Database Update Conventions in the developer's section of the wiki. 

Example: When you start the OpenMRS 1.7 war file, this file is checked against what your database currently has.  If there are any updates that are needed you will be prompted to run those updates automatically (if no updates are needed openmrs starts normally).  The 1.7 war file has knowledge of all previous releases and the changes needed.  So if your database was being used with 1.5 previously, the 1.7 database will walk your database change by change up to the 1.7 level. 

Upgrading OpenMRS when using the Standalone package

If you are using an unzipped standalone package, upgrading openmrs follows the same procedures as above. Use the unzipped folder as the base of where to look for your tomcat/webapps folder.

We recommend first backing up your "database" folder by copying it to a new location.

Upgrading a complete Standalone package

The standalone package contains mysql, tomcat, and openmrs. You simply need to copy the old database to your new unzipped standalone folder and let openmrs ugprade it.

  1. Download/unzip new standalone version
  2. Copy the "database/data" folder from old standalone to new, overwriting the new completely
  3. Stop the old standalone
  4. Start the new standalone
  5. Upon visiting openmrs now, you will see a Maintenance wizard as in "Step 6 - Approve database updates" above. Click update.

Notes

  1. For upgrading to OpenMRS 1.9, there is an OpenMRS University notes about this that you should check out
  2. Use the Validation Module before upgrading to check that all of your data is going to work on OpenMRS 1.9