Keycloak backup and restore
Rehearse identity recovery from the database plus deployment state rather than relying on an admin-console export.
Last updated
On this page (5)
Keycloak ยท Backup and restore
Before you start
- Keycloak build and database version, deployment configuration, secrets, and inventory of providers, themes, and external key or identity services.
- Isolated issuer and disposable relying party.
Procedure
- Back up the server database using supported engine tooling and preserve the matching deployment configuration, custom extensions and external key references.
- Treat a realm export as a separate portability artifact; verify its documented exclusions before planning recovery around it.
- Restore to the recorded build using an isolated database and hostname, with email and production identity-provider callbacks blocked.
Verify the result
- Sign in with a test identity and have the disposable relying party validate a token, expected issuer, and mapped role.
- Check signing-key availability and external dependencies separately; do not infer session continuity from successful sign-in.
