Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

950
Views
How to take db backup in keycloak docker container

I installed keycloak using docker for my django project

docker run -p 8080:8080 -e KEYCLOAK_USER=admin -e KEYCLOAK_PASSWORD=admin jboss/keycloak

now everything is working fine but now i want take backup of keycloak db in docker but i do not know which database installed by default inside keycloak docker container,so how to take backup and restore data, i was using $ sudo docker exec -it 35ba690a68fd /bin/bash this command to interact with container, please any suggestion. i am using redhat Linux

over 4 years ago · Santiago Trujillo
2 answers
Answer question

0

By default, Keycloak is using its embedded H2 database. I suggest that you move to an external DB so that you will be able to managed backup more simply.

see https://www.keycloak.org/docs/latest/server_installation/index.html#_database and https://github.com/keycloak/keycloak-containers/tree/master/server#database regarding the supported DB and how to setup env variables to connect to the DB from the Keycloak container.

Regards,

over 4 years ago · Santiago Trujillo Report

0

the default database is located in /opt/jboss/keycloak/standalone/data/ the name is keycloak.mv.db

if you want to back it up, I suggest mapping a volume when running keycloak:

docker run --volume /root/keycloak/data/:/opt/jboss/keycloak/standalone/data/ ...

this way the database will stay on the host and will keep the changes even if you destroy the container and recreate it.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!