We started out using Camunda with the default h2 database but would now like to change to using Postgres. It is quite easy to reconfigure our application server to use another database and all the process engine and history tables get created automatically. But is there a way to copy the in-flight processes and process history data from the old h2 database into the new Postgres one?
i think no , i moved database from h2 oracle few days ago , in h2 to database i have created several users which is exists in h2 then after moving my database , i lost my all users , currently i am evaluating it , is there any possibilities then definitely let you know , am i tracked your problem or not ?
Thanks for the reply Rahul. I have swapped databases over successfully on a test system and since we have Camunda setup to use active directory / ldap I still have my users and groups.
But, not surprisingly, all uncomplete processes in tasklist are lost as well as process history (which I can see using the REST API) and authorisations disappear from the admin app.
I can see there are scripts available for migrating the database from one version of Camunda to another and was hoping there might be something similar available to copy the data from our h2 database to a new Postgres one.
Would you mind to do me a favor? I want to use another database like postgre.How to change the default h2 database for camunda bpm platform ?
It is quite easy to switch to Postgres say. I think it just required me to create a new database in pgadmin and then change the jdbc settings in Glassfish to point to the new database.
Then the next time the server is restarted Camunda creates all the tables it needs in the new database.
What is more difficult is to migrate your in flight processes, history and authorisations from the old database. I managed to do this by writing a bit of Java code which reads from all the tables in the old database and copies the data to the new ones using jdbc.
Share your Java code, please
With export from H2 (* .sql) to imports PostgreSQL- login occurs, but not everything works correctly.