Configuring Content Replication

Content replication allows documents and folders to be automatically replicated from a source server to a target server. Replication is unidirectional and based on scheduled background processing.

The replication feature requires configuration on both servers.

Configuration

Source Server

Configure the folder that will be monitored for replication events. Only changes inside this folder (and its children) will generate replication events.

OpeenKM configuration propertyDescription

content.replication.monitored.folder

Set the source uuid folder

Target Server

Configure the destination folder and the connection details to the source server. All replicated content will be created under the target folder.

OpeenKM configuration propertyDescription

content.replication.source.url

Set the source server openkm url

content.replication.source.username

Set the source user that will access to the documents in the source server

content.replication.source.password

Set the source user password

content.replication.target.folder

Set the folder's uuid where the content will be replicated

Database Tables

The replication mechanism relies on the following database tables:

TableServerDescription

OKM_CONTENT_REPLICATION_EVENT

Source

Stores all replication events generated when content is created, modified, or deleted inside the monitored folder.

OKM_CONTENT_REPLICATION_STATE

Target

Tracks the processing status of replication events (PENDING, DONE, ERROR).

How It Works

The replication flow is executed automatically and follows these steps:

  1. Source Server
    When a document or folder is created, modified, or deleted inside the monitored folderan event is stored.
  2. Target Server
    Every 5 minutes, ContentReplicationScheduler
    • Fetches new events from the source server and tryes to replicate the action in the target server
    • Stores them as ContentReplicationState entries with status PENDING
    • Processes each event
    • Marks events as DONE or ERROR
    • Automatically retries failed events on the next execution
  3. UUID Preservation
    Documents and folders are created using the same UUID as the source ensuring consistency between servers.