Migrating relational database from Oracle to PostgreSQL

We have keycloak(version - 3.1.0.Final) running in standalone-clustered mode(2 instances) with a shared oracle database on prem. We have one realm configured with 1,50,000 users. We would like to migrate this setup into PostgresSQL on cloud.

From what I understand from the documentation the way forward seems to be

  • Run an export of the current database into a single directory
  • Run the import against the new PostgreSQL database .
  • Manually resolve any issue with the import SQL or look for other migration solutions to get data into the PostgreSQL.

Is my understanding correct ? Is there anyway I can better leverage something within keycloak to make this migration easier?


have you already tried an export/import to try it out? I could be that no further action is required.
You could test it locally with docker and see what the results are.
Look at an example of a docker-compose file on https://github.com/zonaut/keycloak-extensions and import/export examples against a PostgreSQL DB.


I tried this out and it all just worked. I should have tried first and then asked the question.

Thanks for your help.

Arun Menon