Skip to content

Importing the Previously Exported Configuration


Hint - initial service start required

Before you import the configuration, you have to start the installed Keycloak version in its service context at least once. This start initializes the runtime environment under $env:ProgramData\SEAL Systems\data\seal-keycloak.


Importing into Version 15.0.0

The following instructions use $env:ProgramData\SEAL Systems\data\seal-keycloak-export as an example.

  1. Stop the service:

    stop-service seal-keycloak
    
  2. If you want to reimport the complete configuration, proceed with the next step.

    If you only need to import parts of the old configuration:

    1. Make a backup of the $env:ProgramData\SEAL Systems\data\seal-keycloak-export directory.

    2. Delete the unneccessary files from the $env:ProgramData\SEAL Systems\data\seal-keycloak-export directory.

  3. Import the old configuration from the $env:ProgramData\SEAL Systems\data\seal-keycloak-export directory:

    cmd /c "$env:ProgramFiles\SEALSY~1\seal-keycloak\bin\standalone.bat" "-Djboss.socket.binding.port-offset=10000" "-Djboss.server.base.dir=$env:ProgramData\SEALSY~1\data\seal-keycloak" "-Dkeycloak.migration.action=import" "-Dkeycloak.migration.provider=dir" "-Dkeycloak.migration.dir=$env:ProgramData\SEALSY~1\data\seal-keycloak-export" "-Dkeycloak.migration.strategy=OVERWRITE_EXISTING"
    
  4. Cancel Keycloak:

    Ctrl-C
    
  5. Restart the service:

    start-service seal-keycloak
    

Literature

For details on importing, see the original documentation.


Importing into Version 21.0.0

The following instructions use $env:ProgramData\SEAL Systems\data\seal-keycloak-export as an example.

  1. Stop the service:

    stop-service seal-keycloak
    
  2. If you want to reimport the complete configuration, proceed with the next step.

    If you only need to import parts of the old configuration:

    1. Make a backup of the $env:ProgramData\SEAL Systems\data\seal-keycloak-export directory.

    2. Delete the unneccessary files from the $env:ProgramData\SEAL Systems\data\seal-keycloak-export directory.

  3. Import the old configuration from the $env:ProgramData\SEAL Systems\data\seal-keycloak-export directory:

    cmd /c "$env:ProgramData\SEALSY~1\data\seal-keycloak\bin\kc.bat" --config-file="$env:ProgramData\SEALSY~1\config\keycloak.conf" import --dir="$env:ProgramData\SEALSY~1\data\seal-keycloak-export" --override=true
    
  4. Restart the service:

    start-service seal-keycloak
    

Literature

For details on importing, see the original documentation.


Back to top