[keycloak-user] Odp: Re: DB from MongoDB to PostgreSQL migration, how?

K K horizn at wp.pl
Tue Aug 1 17:39:04 EDT 2017


OK,
MongoDB version is 3.2.16, also tried with 3.6.4.
This is my keycloak-server.json config:
https://pastebin.com/vx8ip8Z1

It is working fine with 1.9.8, I am able to export both to single JSON file as well as to directory. Exported file/folder contain all realms and user accounts.
Now, when I am trying to run 2.0.0 against the same config, it gives me following error during the startup:
https://pastebin.com/BNjXQ5ac

similar error appears with 2.1.0:
https://pastebin.com/TJUE83Fa

And then it is working back again with 2.4.0 (still against the same config file), but export DB grows from 3.7MB to 76MB. Events collection is the biggest one - 65MB. And then both 2.5.0 and 2.5.5 won't see realms, no matter which version of Mongo-java driver is used, bundled 3.2.0 or 3.2.1.
https://pastebin.com/LqFHYcJu
However, I can see user accounts and realms in .bson file.

Any idea?

brgds,

Dnia Wtorek, 1 Sierpnia 2017 18:17 Bill Burke <bburke at redhat.com> napisał(a) 
> export/import is the only way.  Migrating from 1.9.8 to 2.5.5, then 
> doing the export might be the trick.  At least from a product 
> perspective we'll need to support migration from 1.9.8->2.5.5->3.x so 
> please post your export/import errors.
> 
> 
> On 8/1/17 10:27 AM, K K wrote:
> > Hi,
> > I am struggling with Keycloak migration from version 1.9.8 to the latest one. Currently I am at 2.4.0 and still MongoDB. Is there any built-in tool to migrate MongoDB db to PostgreSQL?
> >
> > I have tried import and then export, but it doesn't work or I did mistake somewhere.
> >
> >
> > _______________________________________________
> > keycloak-user mailing list
> > keycloak-user at lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/keycloak-user
> 
> _______________________________________________
> keycloak-user mailing list
> keycloak-user at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/keycloak-user





More information about the keycloak-user mailing list