[keycloak-user] Botched exporting a realm and reimporting it into another server

Nick Stolwijk nick.stolwijk at gmail.com
Mon Jun 3 08:12:23 EDT 2019


Hello list,

I tried to export a realm from one server and importing it into another.
This went badly and I'm trying to recover.

What I did:
Old server:
/opt/jboss/keycloak/bin/standalone.sh -Dkeycloak.migration.action=export
-Dkeycloak.migration.provider=singleFile
-Dkeycloak.migration.file=/opt/jboss/keycloak-export.json
-Dkeycloak.migration.realmName=my_realm
-Djboss.socket.binding.port-offset=1000

New server:
/opt/jboss/keycloak/bin/standalone.sh -Dkeycloak.migration.action=import
-Dkeycloak.migration.provider=singleFile
-Dkeycloak.migration.file=/opt/jboss/keycloak-export.json
-Djboss.socket.binding.port-offset=1000

This went well, but I don't see the realm in the new server UI. When I try
to export it from the new server it seems to be there. When I try to re-add
the realm through the UI it complains about duplicate entries. (Which is
logical)

How can I remove the botched import or fix the import so that it shows up?

With regards,

Nick Stolwijk

~~~ Try to leave this world a little better than you found it and, when
your turn comes to die, you can die happy in feeling that at any rate you
have not wasted your time but have done your best ~~~

Lord Baden-Powell


More information about the keycloak-user mailing list