Add-on Data Store: Documentation

The add-on Data Store makes it possible to store images and other binary files more efficiently, in either a database or in the file system.

Table of Contents

This is a paid Sophora add-on. The Data Store has to be activated in the server configuration parameters of the file. Please refer to the Server Documentation to learn about the basics.

Normally, binary content (e.g. pictures) is stored in binary properties in the repository. This content is duplicated when versions of Sophora document are created or when documents are copied to the archive repository. To avoid this duplicated binary content a new binary data store is introduced.  The binary data is only stored once. Even if a picture is created twice (e.g., by cloning a document or be uploading the same picture to different Sophora documents) the binary content is stored only once. To identify duplicate binary content a hash code is build and used as the primary key. When the binary data store is activated the content is stored in the file system or in a special database. If a binary data store is configured the Sophora Server still reads binary datas in the repository. So a migration is not necessary.

To configure the file system data store:


By default the binary data is stored in the directory ${sophora.home}/repository/binaries If you want to save the binary data in a different directory, you can use the server property sophora.binarystore.fs.baseDirectory. The configured path is relative to sophora.home.

To configure the database data store:

# Possible values: mysql, derby or oracle

When document versions or whole documents are removed from the repository, the binary data in the data store is unaffected. An asynchronous job checks all binary data in the data store. When no reference to the binary is found (not in the main repository nor in the archive repository) the binary data is removed from the data store. This purge job can be controlled by the following properties:

sophora.binarystore.purgeJob.cronTriggerExpression=0 0 2 * * ?