[keycloak-user] backup strategy

Corentin Dupont corentin.dupont at gmail.com
Tue Feb 6 06:09:08 EST 2018


Hi guys,
I wonder what the backup strategy is?
Is it good practice to export regularly all Keycloak configuration?

I can export with the command:
./keycloak/bin/standalone.sh -Dkeycloak.migration.action=export
-Dkeycloak.migration.provider=singleFile
-Dkeycloak.migration.file=export-`date +"%m-%d-%y"`.json
-Djboss.http.port=8888 -Djboss.https.port=9999
-Djboss.management.http.port=7777

It exports the current configuration (realms, users...).
I set different ports so it can run concurently with the running instance
of keycloak.
I can set a cron job with the command, but unfortunately this command need
to be stopped by Ctrl-C.

-> How to make it stop after the export?

Other question, the export need to be run on the same container than
Keycloak, but this is not very practical in a Cloud setting. I use Amazon
ECS, so I have to log in the VM and then the container. I have then to
extract the file with various scp.
Is there any way to make this easier (i.e. with an API command)?

Cheers
Corentin


More information about the keycloak-user mailing list