This section will help you with upgrading OpenMRS. These are the instructions for manually upgrading OpenMRS.
- Step 1 - Stopping Modules
- Step 2 - Back up the current database
- Step 3 - Undeploy current openmrs.war file
- Step 4 - Deploy new openmrs.war file
- Step 5 - Restart Tomcat
- Step 6 - Approve database updates
- Step 7 - Check for and install updates for modules
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.
- Download/unzip new standalone version
- Copy the "database/data" folder from old standalone to new, overwriting the new completely
- Stop the old standalone
- Start the new standalone
- Upon visiting openmrs now, you will see a Maintenance wizard as in "Step 6 - Approve database updates" above. Click update.