Camunda data migration from MySQL to PostgreSQL database

Hi,

I have a process definition for tenant in MySQL database. Now i wanted to migrate all the runtime+historic data to PostgreSQL database.

I took datadump from mysql(only data, not structures) as .sql file format. This file contains only insert statements.

When i try to run the sql scripts using pgAdmin4 querytool, i was getting errors like below:

ERROR: INSERT has more expressions than target columns
LINE 23: …pmndi:BPMNDiagram>\n</bpmn:definitions>\n’,0,NULL,NULL,NULL,…
^
SQL state: 42601
Character: 12156

Seems columns are not identical between MySQL and PostgreSQL.

If there’s a way to migrate camunda data from MySQL to PostgreSQL???

Hi @aravindhrs,

this should not happen, as the database structures are the same for each underlying database system.

Could you please double check the versions of the databases, i.e. export 7.11 mysql. and insert into 7.11 postgres?

And could post the insert statement that causes the error? Maybe it’s an encoding problem with the XML content.

Hope this helps, Ingo

@Ingo_Richtsmeier, yeah its version issue and i fixed it. But we are facing other issues in storing bpmn xml.

Postgres supports single quotes to wrap a string. But the bpmn xml has a double quotes which causes the issue while executing the scripts.

Any updates regarding the issue?