Skip to content

Data export / import

The data of Keycloak can be easily extracted or imported. This gives you the full control over your data.


Exports can be especially useful if you want to migrate your whole Keycloak database from one environment to another. Export is available through Cloud-IAM dashboard and Cloud-IAM API and return a single zip file.

Export your data

Depending on the size of the database, the export can take longer.


Once the export is complete, extract the zip file in which you will find two files:

  • xxx-realm.json
  • xxx-users-0.json

Contact us

For specific use-case, large data file, please contact the support.

Import Realm

To import the realm, connect to the Keycloak Admin console and click on Create Realm:

Import realm
Import Realm

Then import the file xxx-realm.json by clicking on Browse ...:

Create realm
Create Realm

Next, click on Create.

Import users

To import the users, connect to the Keycloak Admin console, select a Realm and click on Realm Settings > Action and choose Partial import:

Import users
Import users

Then import the file xxx-users-0.json by clicking on Browse ...:

Create users
Create users

Check the box to choose the resources you want to import and select an action if the resource already exists based on your needs.

Next, click on Import.