CMDBuild Forum

How can I move data configuration between different CMDBuild servers

how can I move data configuration from one server CMDBuild to another without data (only configuration)

if you have two CMDBuild instances, used for test and production, and you want to apply to the production instance the structural changes (creating classes, attributes, domains) carried out on the test instance, the best way is to run the SQL commands automatically saved in the log file “cmdbuild_dd_sql.log”.
Of course it is recommended that you first perform a full backup of the database.
CMDBuild Team

Thank you for this way. I'll try it.
 
will you thinking about tool in system to export-import configuration?  
 
Previously Tecnoteca wrote:
if you have two CMDBuild instances, used for test and production, and you want to apply to the production instance the structural changes (creating classes, attributes, domains) carried out on the test instance, the best way is to run the SQL commands automatically saved in the log file "cmdbuild_dd_sql.log".
Of course it is recommended that you first perform a full backup of the database.
CMDBuild Team

 

it would surely be a useful tool.
However, it is not expected in the short - medium term because we have many other activities already scheduled in the coming months.
CMDBuild Team

 

 

Where is “cmdbuild_dd_sql.log”

 
I have a cmdbuild install that i am trying to move and i cant seem to get the pgsql dump to load.  Keep getting error about syntax and integrers in date fields.  
 
Previously Maxim wrote:
Thank you for this way. I'll try it.
 
will you thinking about tool in system to export-import configuration?  
 
Previously Tecnoteca wrote:
if you have two CMDBuild instances, used for test and production, and you want to apply to the production instance the structural changes (creating classes, attributes, domains) carried out on the test instance, the best way is to run the SQL commands automatically saved in the log file "cmdbuild_dd_sql.log".
Of course it is recommended that you first perform a full backup of the database.
CMDBuild Team

 

In the Tomcat logs folder.

CMDBuild Team

Nope.  Just host access logs and catalina.out.xx.gz files.


 
Previously Tecnoteca wrote:

In the Tomcat logs folder.

CMDBuild Team

You can check what’s written in the WEB-INF/conf/log4j.conf file.
CMDBuild Team

log4j.debug=TRUE
log4j.rootLogger=WARN, R
 
log4j.logger.auth=WARN
log4j.logger.bim=WARN
log4j.logger.cmdbuild=INFO
log4j.logger.ddsql=INFO, DD
log4j.logger.dms=WARN
log4j.logger.email=INFO
log4j.logger.jsonrpc=INFO
log4j.logger.persist=WARN
log4j.logger.rest=WARN
log4j.logger.scheduler=WARN
log4j.logger.soap=WARN
log4j.logger.sql=WARN
log4j.logger.workflow=INFO
 
log4j.logger.org.springframework.jdbc.core=WARN
 
log4j.appender.R=org.apache.log4j.RollingFileAppender
log4j.appender.R.File=${catalina.base}/logs/cmdbuild.log
log4j.appender.R.MaxFileSize=100MB
log4j.appender.R.MaxBackupIndex=10
log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern=%-5.5p %d{yyyy-MM-dd HH:mm:ss} [%-8c] %m%n
 
 
log4j.appender.DD=org.apache.log4j.RollingFileAppender
log4j.appender.DD.File=${catalina.base}/logs/cmdbuild_dd_sql.log
log4j.appender.DD.MaxFileSize=100MB
log4j.appender.DD.MaxBackupIndex=10
log4j.appender.DD.layout=org.apache.log4j.PatternLayout
log4j.appender.DD.layout.ConversionPattern=%-5.5p %d{yyyy-MM-dd HH:mm:ss} [%-8c] %m%n
 
 
 
 
 
 
Previously Tecnoteca wrote:
You can check what's written in the WEB-INF/conf/log4j.conf file.
CMDBuild Team

 

This topic is quite old.
Can you please tell me where in year 2021 I can find cmdbuild_dd_sql.log, and if I need to put log4j.conf in tomcat logs folder (please confirm is it still true), what contents log4j.conf should have in order to produce cmdbuild_dd_sql.log.

At the moment I don’t have cmdbuild_dd_sql.log in cmdbuild directory tree.

1 Like

Can someone provide an answer for cmdbuild v3.3?

1 Like

this situation is exaclty what we want to do copy dev changes to prod server…so bump same question as glu.
what settings needed for log4j.con because only see cmdbuild_ddl.log cmdbuild_sql.log but they are 0 bytes.

or what is the best way to copy changes from one server to another?

1 Like

Bumping this as I’ve asked this same question before among crickets

Essentially what i have done to copy production to dev instances…

  • stop tomcat service

  • Backup the production dB using pgadmin.

  • select Backup advanced tab check: pre-data, data, and post-data. Leave rest default

    • /pgsql-9.6/bin/pg_dump --file "/var/lib/pgadmin4/storage/audit_mngit.ca/backup/cmdb.sql" --host "/var/run/postgresql" --port "5432" --username "postgres" --blobs --compress "6" --selection=pre-data --selection=data --selection=post-data --verbose --role "postgres" --encoding "UTF8" "cmdb"
  • delete the dev dB (pgadmin → right click delete/drop)

         DROP DATABASE cmdb_copy;
    
  • create the dev db same settings. SQL:

          CREATE DATABASE cmdb_copy
      	    WITH 
      	    OWNER = cmdbuild
      	    ENCODING = 'UTF8'
      	    LC_COLLATE = 'en_US.UTF-8'
      	    LC_CTYPE = 'en_US.UTF-8'
      	    TABLESPACE = pg_default
      	    CONNECTION LIMIT = -1;
      	
      	ALTER DATABASE cmdb_copy
          SET search_path TO "$user", public, gis;
    
  • restore backup to fresh devDB (pgadmin advanced select same as backup pre-data data, and post-data)

  • start tomcat

  • edit config on dev instance removing any hostname specific settings (e.g. saml config items in my case) or change dB connection user passwords.

  • restart tomcat

@mngit-Sean what version of CMDBuild is this for? Does this work the other way (from dev to prod)? Be mindful that this is an old thread for old versions. Better post this to a newer thread for more visibility.

This was used on Ready-2-use 2.1 CMDBuild 3.3.2
I imagine it would work on others. All the info is stored in the postgres database