Importing a Peviously Exported Configuration¶
Hint - initial service start required
Before you import 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
.
Importing into 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
-
If you want to reimport the complete configuration, proceed with the next step.
If you only need to import parts of the old configuration:
-
Make a backup of the
/opt/seal/data/seal-keycloak-export
directory. -
Delete the unneccessary files from the
/opt/seal/data/seal-keycloak-export
directory.
-
-
Import the old configuration from the
/opt/seal/data/seal-keycloak-export
directory: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=import -Dkeycloak.migration.provider=dir -Dkeycloak.migration.dir=/opt/seal/data/seal-keycloak-export -Dkeycloak.migration.strategy=OVERWRITE_EXISTING
-
Cancel Keycloak:
Ctrl-C
-
Restart the service:
sudo systemctl start seal-keycloak
Literature
For details on importing, see the original documentation.
Importing into 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
-
If you want to reimport the complete configuration, proceed with the next step.
If you only need to import parts of the old configuration:
-
Make a backup of the
/opt/seal/data/seal-keycloak-export
directory. -
Delete the unneccessary files from the
/opt/seal/data/seal-keycloak-export
directory.
-
-
Import the old configuration from the
/opt/seal/data/seal-keycloak-export
directory:sudo -u seal /opt/seal/data/seal-keycloak/bin/kc.sh --config-file=/opt/seal/etc/keycloak.conf import --dir=/opt/seal/data/seal-keycloak-export --override=true
-
Restart the service:
sudo systemctl start seal-keycloak
Literature
For details on importing, see the original documentation.