DMSconfiguration
DMS integration
CMDBuild supports integration with Document Management Systems (DMS) to provide the following features:
- Attach files to any card
- Classify attachments using categories
- Display and browse uploaded files
Category and metadata management rely on a DMS exposed through standard APIs.
Configuring the DMS in CMDBuild
DMS settings can be managed through REST commands.
Use editconfig to open a graphical configuration interface when CMDBuild is running locally. Alternatively, use setconfig or setconfigs to apply settings from the command line.
Example:
cmdbuild.sh restws setconfig org.cmdbuild.dms.enabled true
General configuration
| Config | Type | Description |
|---|---|---|
org.cmdbuild.dms.enabled | Boolean | Enables or disables the DMS service |
org.cmdbuild.dms.service.type | String | DMS service type: alfresco, postgres, or sharepoint_online |
org.cmdbuild.dms.category.lookup | String | Base lookup used for attachment categories |
org.cmdbuild.dms.regularAttachments.maxFileSize | Int | Maximum attachment size in MB |
org.cmdbuild.dms.incomingEmailAttachments.allowedFileExtensions | String[List] | Allowed file extensions for email attachments |
org.cmdbuild.dms.autolink.path | String | Base path used for generated links |
org.cmdbuild.dms.autolink.script | String | Helper script used for generated links |
Alfresco integration
Configure category management in Alfresco
CMDBuild can store attachment categories in Alfresco metadata.
The following example refers to Alfresco 26.2.0. Names and identifiers are provided for demonstration purposes and can be changed according to project requirements.
Create the following files in:
${ALFRESCO_HOME}/tomcat/shared/classes/alfresco/extension
cmdbuild-model-context.xml
(content unchanged)
cmdbuild-model.xml
(content unchanged)
Alfresco configuration
| Config | Type | Description |
|---|---|---|
org.cmdbuild.dms.service.alfresco.user | String | Service username |
org.cmdbuild.dms.service.alfresco.password | String | Service password |
org.cmdbuild.dms.service.alfresco.path | String | Repository path |
org.cmdbuild.dms.service.alfresco.apiBaseUrl | String | Alfresco API base URL |
Backup of Alfresco data
To back up Alfresco data, create a backup of the Alfresco PostgreSQL database.
Example:
docker compose -f "${alfresco_compose_path}/docker-compose.yml" exec -T postgres \
pg_dump -U alfresco -F c alfresco | gzip > "/backup/alfresco/alfresco.backup.gz"
This command connects to the PostgreSQL container managed by Docker Compose, creates a database dump in PostgreSQL custom format, compresses it using gzip, and stores the resulting archive in /backup/alfresco/alfresco.backup.gz.
Backup schedule
To schedule recurring backups on Linux:
- Create the file
/etc/cron.d/backup - Add the required backup commands using standard cron syntax
For easier maintenance, it is recommended to place backup commands in dedicated scripts and invoke those scripts from cron.
Example:
# CMDBuild backup — runs daily at 22:00
00 22 * * * root /usr/local/bin/backup-cmdbuild.sh ${cmdbuild.webapp.name} > /dev/null 2>&1
# Alfresco backup — runs daily at 22:30
30 22 * * * root /usr/local/bin/backup-alfresco.sh > /dev/null 2>&1
SharePoint Online integration
SharePoint configuration
| Config | Type | Description |
|---|---|---|
org.cmdbuild.dms.service.sharepoint.user | String | Service username |
org.cmdbuild.dms.service.sharepoint.password | String | Service password |
org.cmdbuild.dms.service.sharepoint.url | String | SharePoint site URL |
org.cmdbuild.dms.service.sharepoint.path | String | Document library path |
org.cmdbuild.dms.service.sharepoint.graphApi.url | String | Microsoft Graph API URL |
org.cmdbuild.dms.service.sharepoint.auth.serviceUrl | String | Authentication service URL |
org.cmdbuild.dms.service.sharepoint.auth.clientId | String | Application client ID |
org.cmdbuild.dms.service.sharepoint.auth.clientSecret | String | Application client secret |
org.cmdbuild.dms.service.sharepoint.auth.protocol | String | Authentication protocol |
org.cmdbuild.dms.service.sharepoint.auth.resourceId | String | Authentication resource ID |
org.cmdbuild.dms.service.sharepoint.auth.tenantId | String | Microsoft Entra tenant ID |
org.cmdbuild.dms.service.sharepoint.model.authorColumn | String | Author metadata column |
org.cmdbuild.dms.service.sharepoint.model.categoryColumn | String | Category metadata column |
org.cmdbuild.dms.service.sharepoint.model.descriptionColumn | String | Description metadata column |