Change repository home

By default the repository is located at "$TOMCAT_HOME/repository" but you can change to other location.

This action must be done with application stopped.

Understanding the contents of repository folders

Into "$TOMCAT_HOME/repository" there are three folder tmpindex, cache and datastore.

FolderBackupDescription

tmp

No

This folder contains some temporary files to be shared beween several clusteres OpenKM instances.

index

No

The folder which contains the Lucene search engine indexes. The content of that folder can be rebuild.

Although is not mandatory backup this folder, we recommend doing it.

 cache

 No

The folder which contains the application cached files. For example, for previewing documents, sometimes is needed to transform the original document to other format. The conversion consumes a lot of hardware resources, for this reason the application  stores these converted files to be reused later. The content of that folder can be cleaned without major problems.

Although is not mandatory backup this folder, we recommend doing it.

datastore

Yes

The folder which contains all binary data of the documents. 

Is mandatory mandatory backup this folder otherwise the binary data of the documents could be lost on a server hardware fail.

extraction

Yes

This folder contains the text extracted from those documents stored in OpenKM. A backup is not really necessary but may be a time saver. 

ocr_templates

Yes

This folder contains the binary data of the ocr templates.

Move entire repository location

  • Stop the application
  • Move the "$TOMCAT_HOME/repository" to other location.
  • Edit the "$TOMCAT_HOME/openkm.properties" file and add the property "repository.home".
  • Start the application

Sample1

From OpenKM version 7.1.x and upper when the "repository.home" paremeter is set, the location in the file system of the lucene index is not affected. You should use the specific parameter named "spring.jpa.properties.hibernate.search.default.indexBase" to move the lucene index in a new location.

Windows

repository.home=C:/okmrepo

Linux

repository.home=/mnt/okmrepo

Move repository folders  individually

Table of properties:

FolderPropertyDefault

index

spring.jpa.properties.hibernate.search.default.indexBase

${catalina.home}/repository/index

tmp

repository.temp.home

${repository.home}/tmp

cache

repository.cache.home

${repository.home}/${tenant.id}/cache

datastore

repository.datastore.home

${repository.home}/${tenant.id}/datastore

extraction

repository.extraction.home

${repository.home}/${tenant.id}/extraction

ocr template

repository.ocr.template.home

${repository.home}/${tenant.id}/ocr_template

These parameters can be used in combination with the parameter "repository.home" and "tenant.id".

  • Stop the application
  • Move the "$TOMCAT_HOME/repository/{folder}" to other location.
  • Edit the "$TOMCAT_HOME/openkm.properties" file and add the some property.
  • Start the application

Sample

Windows

spring.jpa.properties.hibernate.search.default.indexBase=C:/lucene/index
repository.datastore.home=D:/okm/${repository.home}/datastore
repository.cache.home=D:/okm/${repository.home}/cacherepository.temp.home=D:/okm/${repository.home}/tmp
repository.ocr.template.home=D:/okm/${repository.home}/cacherepository.temp.home=D:/okm/${repository.home}/ocr_template

Linux

spring.jpa.properties.hibernate.search.default.indexBase=/mnt/lucene/index
repository.datastore.home=/mnt/okm/${repository.home}/datastore
repository.cache.home=/mnt/okm/${repository.home}/cacherepository.temp.home=/mnt/okm/${repository.home}/tmp
repository.ocr.template.home=/mnt/okm/${repository.home}/cacherepository.temp.home=/mnt/okm/${repository.home}/ocr_template

Troubleshooting

Windows mapped network disk is not working

We encourage do not use networking ( NAS or Samba ) for storing repository. Because network issues will affect the repository we consider as a dangerous configuration.

 Seems there're restrictions using network unit ( mapped with "net use" command line ) and application running from services. To solve it is necessary to create a link between UNC and the file system.

MKLINK /D C:\okm-repository \\192.168.1.36\eDocuments\okm-repository

In most cases will be necessary to use a standard user for running OpenKM service either the standard configured. Take a look at OpenKM windows service configuration to change the default "Local system user" to your own.