Exporting the Current Configuration¶
Hint - initial service start required
Before you export the configuration, you must start the installed Keycloak version in its service context at least once. This start initializes the runtime environment under /opt/seal/data/seal-keycloak.
Exporting from Version 15.0.0¶
The following instructions use /opt/seal/data/seal-keycloak-export as an example.
- 
Stop the service: sudo systemctl stop seal-keycloak
- 
Export the current configuration to the /opt/seal/data/seal-keycloak-exportdirectory:sudo -u seal /opt/seal/seal-keycloak/bin/standalone.sh -Djboss.socket.binding.port-offset=10000 -Djboss.server.base.dir=/opt/seal/data/seal-keycloak -Dkeycloak.migration.action=export -Dkeycloak.migration.provider=dir -Dkeycloak.migration.dir=/opt/seal/data/seal-keycloak-export
- 
List the exported files: ls -l /opt/seal/data/seal-keycloak-exportThe result includes the following files: Example - file list - master-realm.json
- master-users-0.json
- ... (potentially further numbered files, like master-users-1.json)
- SEAL-realm.json
- SEAL-users-0.json
- ... (potentially further numbered files, like SEAL-users-1.json)
 
- 
Cancel Keycloak: Ctrl-C
- 
Restart the service: sudo systemctl start seal-keycloak
Literature
For details on exporting, see the original documentation.
Exporting from Version 21.0.0¶
The following instructions use /opt/seal/data/seal-keycloak-export as an example.
- 
Stop the service: sudo systemctl stop seal-keycloak
- 
Export the current configuration to the /opt/seal/data/seal-keycloak-exportdirectory:sudo -u seal /opt/seal/data/seal-keycloak/bin/kc.sh --config-file=/opt/seal/etc/keycloak.conf export --dir=/opt/seal/data/seal-keycloak-export
- 
List the exported files: ls -l /opt/seal/data/seal-keycloak-exportThe result includes the following files: Example - file list - master-realm.json
- master-users-0.json
- ... (potentially further numbered files, like master-users-1.json)
- SEAL-realm.json
- SEAL-users-0.json
- ... (potentially further numbered files, like SEAL-users-1.json)
 
- 
Restart the service: sudo systemctl start seal-keycloak
Literature
For details on exporting, see the original documentation.