Skip to main content
Version: 4.3

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​

ConfigTypeDescription
org.cmdbuild.dms.enabledBooleanEnables or disables the DMS service
org.cmdbuild.dms.service.typeStringDMS service type: alfresco, postgres, or sharepoint_online
org.cmdbuild.dms.category.lookupStringBase lookup used for attachment categories
org.cmdbuild.dms.regularAttachments.maxFileSizeIntMaximum attachment size in MB
org.cmdbuild.dms.incomingEmailAttachments.allowedFileExtensionsString[List]Allowed file extensions for email attachments
org.cmdbuild.dms.autolink.pathStringBase path used for generated links
org.cmdbuild.dms.autolink.scriptStringHelper 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​

ConfigTypeDescription
org.cmdbuild.dms.service.alfresco.userStringService username
org.cmdbuild.dms.service.alfresco.passwordStringService password
org.cmdbuild.dms.service.alfresco.pathStringRepository path
org.cmdbuild.dms.service.alfresco.apiBaseUrlStringAlfresco 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:

  1. Create the file /etc/cron.d/backup
  2. 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​

ConfigTypeDescription
org.cmdbuild.dms.service.sharepoint.userStringService username
org.cmdbuild.dms.service.sharepoint.passwordStringService password
org.cmdbuild.dms.service.sharepoint.urlStringSharePoint site URL
org.cmdbuild.dms.service.sharepoint.pathStringDocument library path
org.cmdbuild.dms.service.sharepoint.graphApi.urlStringMicrosoft Graph API URL
org.cmdbuild.dms.service.sharepoint.auth.serviceUrlStringAuthentication service URL
org.cmdbuild.dms.service.sharepoint.auth.clientIdStringApplication client ID
org.cmdbuild.dms.service.sharepoint.auth.clientSecretStringApplication client secret
org.cmdbuild.dms.service.sharepoint.auth.protocolStringAuthentication protocol
org.cmdbuild.dms.service.sharepoint.auth.resourceIdStringAuthentication resource ID
org.cmdbuild.dms.service.sharepoint.auth.tenantIdStringMicrosoft Entra tenant ID
org.cmdbuild.dms.service.sharepoint.model.authorColumnStringAuthor metadata column
org.cmdbuild.dms.service.sharepoint.model.categoryColumnStringCategory metadata column
org.cmdbuild.dms.service.sharepoint.model.descriptionColumnStringDescription metadata column