Realm export to new instance

Hi everyone
I was wondering if it’s possible to extract a realm or in general part of the instance to import in another instance.
My use case:
Instance 1 with realm A and realm B
Want to create a new instance on another machine, with only realm B.
I could clone the disk and then delete the realm I don’t want but I don’t think it’s really scalable
Any idea?


We don’t have a mechanism for migrating a realm to another system; a realm is mainly a keycloak construct that we build on top of and I’m pretty sure keycloak doesn’t support realm migration.

Dumping and importing the entire DB then deleting the unwanted realms is your only option at the moment.

Maybe some info on your exact use case and we can look at options?

1 Like

Hi Rich, thanks for your answer
Nothing important, in my case I showed my instance to a colleague, created a Realm for him with a lot of stuff and then I wanted to export his realm to his new instance which would have been faster than redoing everything. It worked by cloning the VM and removing my realm, but I didn’t want to risk leaving passwords / sensitive data in his copy