이 콘텐츠는 선택한 언어로 제공되지 않습니다.

Chapter 2. Upgrading the Red Hat build of Keycloak server


2.1. Preparing for upgrading

Procedure

  1. Back up the old installation, such as configuration, themes, and so on.
  2. Back up the database using instructions in the documentation for your relational database.

    The database will no longer be compatible with the old server after the upgrade. If you need to revert the upgrade, first restore the old installation, and then restore the database from the backup copy.

  3. Handle any open transactions and delete the data/tx-object-store/ transaction directory.
Note

In a minor upgrade of Red Hat build of Keycloak, all user sessions are lost. After the upgrade, all users will have to log in again.

2.2. Downloading the server ZIP file

Procedure

  1. Download Red Hat build of Keycloak from the Red Hat website and extract it.
  2. Move the ZIP file to the desired location.
  3. Extract the archive.

    After extracting this file, you should have a directory that is named rhbk-22.0.13.

  4. Copy conf/, providers/ and themes/ from the previous installation to the new installation.

2.3. Database migration

Red Hat build of Keycloak can automatically migrate the database schema, or you can choose to do it manually. By default, the database is automatically migrated when you start the new installation for the first time.

2.3.1. Automatic relational database migration

To perform an automatic migration, start the server connected to the desired database. If the database schema has changed for the new version of the server, it will be migrated.

Creating an index on huge tables with millions of records can be very time-consuming and possibly cause a major service disruption. Therefore, a threshold exists to limit the number of records allowed for the index. A warning message appears in the server logs with SQL commands you can apply later manually.

To change the threshold, set the index-creation-threshold property, value for the default connections-liquibase provider:

kc.[sh|bat] start --spi-connections-liquibase-default-index-creation-threshold=300000
Copy to Clipboard Toggle word wrap

2.3.2. Manual relational database migration

To enable manual upgrading of the database schema, set the migration-strategy property value to "manual" for the default connections-jpa provider:

kc.[sh|bat] start --spi-connections-jpa-legacy-migration-strategy=manual
Copy to Clipboard Toggle word wrap

When you start the server with this configuration, the server checks if the database needs to be migrated. The required changes are written to the bin/keycloak-database-update.sql SQL file that you can review and manually run against the database.

If you want to change the path and name of the exported SQL file, set the migration-export property for the default connections-jpa provider:

kc.[sh|bat] start --spi-connections-jpa-legacy-migration-export=<path>/<file.sql>
Copy to Clipboard Toggle word wrap

For more details on applying this file to the database, see the documentation for your relational database. After the changes have been written to the file, the server exits.

맨 위로 이동
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다. 최신 업데이트를 확인하세요.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

Theme

© 2025 Red Hat