Backing up and restoring Semaphore
- Last Updated: May 13, 2026
- 4 minute read
- Semaphore
- Documentation
This section describes methods that can be used to back-up and restore a Semaphore installation. Please note that it is very important that regular back-ups be put in place to ensure that the system data is protected in case of accidental deletion or system failure.
Backing up Semaphore
An initial back-up of all installations is recommended including:
- All files/sub-directories under /opt/semaphore - That is, wherever the Semaphore software has been installed
- All files/sub-directories in which Semaphore data is stored (these directories are set during the installation process in the configuration files) but generally:
- /var/opt/semaphore
- /etc/opt/semaphore
- All files/sub-directories within the “Semaphore Workbench Home” folder structure
- The Semaphore (and related) service folders/files from “/etc/systemd/system/semaphore.service.wants/” (note that this directory contains softlinks) and “/usr/lib/systemd/system/”
Incremental backups should be regularly performed on all of the above directories.
Backing up model data
The model contains the most critical element of the Semaphore installation. All data used by any Semaphore implementation can be regenerated using the information stored in the model, therefore, it is critical that this information be regularly backed-up.
For the “Knowledge Model Management” component of “Semaphore Studio” there is both model data and associated model-based (publisher) configuration as well as custom modifications that may have been made for the installation. A backup of all of this information (data and configuration) can be performed within “Knowledge Model Management” when using a user assigned the “SemaphoreSuperAdministrators” role using the “Backup Models” option from the “Tools” menu:

This the preferred method for backing up, however, if you wish to automate this or perform this operation from the operating system you can use the following methods of backing up both data and configuration:
- Models - The “kmm-backup” tool can be used (see Backing up and restoring Semaphore for details) to backup the models. This process can backup all model data including model history. If you want to backup a specific model without any model history you can use the “Export” function in “Knowledge Model Management” (or via the API). Depending on where the model information is stored you can also do the following to backup model and any history:
- Jena TDB (the default location for model data) - If you take a copy of the entire “Semaphore Workbench Home” directory structure this will contain the model data as well (in the “workspace/SemaphoreData” sub-folder). Note that you should ONLY copy this data when the “Knowledge Model Management” service has been stopped as the application could have model data in memory while it is running (restarting the service after the copy is complete).
- MarkLogic - You can use the standard MarkLogic database backup tools to backup the model data in whichever database(s) are configured.
- Model Configuration - This data is stored in the “Semaphore Workbench Home” directory so to backup simply copy this directory structure after first stopping the “Knowledge Model Management” service (restarting after complete).
Fully restoring a Semaphore installation
The following is the recommended restoration method for a full Semaphore installation:
- Install Semaphore - Install the Semaphore applications using the original application installers and following the instructions found in the Backing up and restoring Semaphore.
- Configure Semantic Enhancement Server and Classification Server - Potentially using the configuration files from the system backup (contained in files under the “/etc/semaphore/” directory structure).
- Configure Studio - Setup any authentication providers, install the relevant licence then setup any relevant Studio “Services”.
- Configure Knowledge Model Management - If external triple store, ensure software is installed and configured then set the relevant environment variables so KMM can communicate with it (see the installation guide for details). Also, install any KMM plugins (e.g. Publisher and/or FACTS).
- Restore Knowledge Model Management Models and Configuration - If having used the “Backup Models” in the old Knowledge Model Management, restore the full model backup using the “Restore Models” option when using a user assigned the “SemaphoreSuperAdministrators” role. This will restore both models and publisher configuration information. Note that this method works regardless of back-end triple store (Jena TDB or MarkLogic).
Another option is to restore a back-up made of the server files onto the new server. To manually restore from a back-up of all installation directories, do the following:
- Restore all files to their original locations (including service files) - If you are using MarkLogic, make sure all of the databases are restored appropriately (if required).
- Ensure that the relevant systemd scripts are set to appropriately start themselves on reboot
You can use the command “systemctl” to set this up. For example, in order to make sure Semantic Enhancement Server service starts automatically on machine startup and shuts down cleanly when the machine is turned off do the following:
systemctl enable semaphore-ses
- Start all services
Note that this method is highly dependant upon a full and up to date backup having been made of all components.