Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The Application Data Directory is the folder that OpenMRS uses for external storage of data. Most data is stored in the database but some large files and other things that are not appropriate for a relational databaseTypically, this will include things like OpenMRS modules, Lucene indexes, OpenMRS's runtime configuration properties and any attachments. Other files might be added here depending on which modules you have installed.

Default location

As of version 1.8, openmrs will put this directory in the current running directory. If you are using tomcat this is Tomcat, this will be a directory relative to your CATALINA_HOME  environment variable. If Tomcat was installed following the instructions on the Wiki, this should be either /opt/tomcathometomcat7/.openmrs OpenMRS on Linux or C:\Program Files\Apache\Tomcat 67.0\OpenMRS on Windows.

In version 1.7 and earlier, the default location is the home directory of the user running tomcat. ~/yourusername/.openmrs OpenMRS on Linux or C:\Docs Documents and Settings\yourusername\Application Data\OpenMRS on Windows.

Manually setting the location

...

  1. Add a key to your runtime properties file:
    • application_data_directory=/my/custom/location/
    Modify the openmrs.war file: /WEB-INF/web.xml fileChange the context parameter "application.data.directory" to something. (use a trailing slash)
  2. Setup the CATALINA_OPTS  environment variable for the user running Tomcat to include -DOPENMRS_APPLICATION_DATA_DIRECTORY=<path>.
  3. Modify the conf/Catalina/openmrs/context.xml file in your tomcat (or other server) config:
  4. Modify the openmrs.war file: /WEB-INF/web.xml file
    • Change the context parameter "application.data.directory" to whatever directory you want.

For Developers

There are several convenience methods to help developers findSee the methods:

...