[keycloak-user] Preserving IDs while Importing and Exporting

Luis Santos luis at luissantos.pt
Wed Apr 3 14:26:12 EDT 2019


Hi Vlasta,

Thanks for the quick reply.

Unfortunately I believe this is not an option for us because we are trying
to migrate from Ms sql server to postgresql. There are several reasons why
we want to use postgresql but I don't think they are relevant in this
discussion.

I forgot to mention this. Sorry.

On Wed, Apr 3, 2019, 20:15 Vlasta Ramik <vramik at redhat.com> wrote:

> Hey Luis,
>
> I believe you should try migration via Automatic Relational Database
> Migration [1]
>
> [1] https://www.keycloak.org/docs/latest/upgrading/index.html#_migrate_db
>
> On 4/3/19 7:40 PM, Luis Santos wrote:
> > Hi everyone,
> >
> > I'm currently working on a Keycloak migration/upgrade. We are trying to
> > export (kc 3.x.x) all our realms and users and import them again into a
> new
> > instance(kc 5.0.0).
> >
> > Unfortunately, the import process generates new uuids and our existing
> > services break because they rely on the keycloak user ID.
> >
> > Did anyone come across a similar problem? If yes how did you solve it?
> >
> > I did some digging and I found a bug (
> > https://issues.jboss.org/browse/KEYCLOAK-4336) referring to a similar
> > problem but it was rejected without any details.
> >
> > I also find the code that overrides the UUID and I'm planning to change
> it.
> > Is this approach wrong? I'm not familiar with the code base and maybe
> these
> > changes will
> > lead me to a dead end.
> >
> >
> https://github.com/keycloak/keycloak/blob/a516a795a2147128b4c26bafaba95a8477614aab/services/src/main/java/org/keycloak/partialimport/UsersPartialImport.java#L113
> >
> > I would be grateful if someone could send in the right direction.
> >
> > Kind regards / Mit freundlichen Grüßen
> > Luis Santos
> > _______________________________________________
> > 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