Skip to content

Instantly share code, notes, and snippets.

@MrHassanMurtaza
MrHassanMurtaza / keycloak-export-docker.sh
Last active January 26, 2022 21:19
Keycloak export in Docker and Exit
# If something goes wrong, this script does not run forever but times out
TIMEOUT_SECONDS=300
# Logfile for the keycloak export instance
LOGFILE=/tmp/standalone.sh.log
# destionation export file
JSON_EXPORT_FILE=/tmp/realms-export-single-file.json
rm -f ${LOGFILE} ${JSON_EXPORT_FILE}
# Start a new keycloak instance with exporting options enabled.