Exporting database for docker installation

Can someone share some instructions on how to make a backup of the mysql database for a docker installation of Vikunja?

I tried mysqldump -u <user> -p -h <db-host> <database> > vkunja-backup.sql but I think this is not applicable for the docker installation.

I think I figured it out. I used the following command, please chime in if that is the way to do it:

  • If container for sb is: vikunja-db-1
  • pass: myPass
  • user: vikunja
  • database: vikunja
    sudo docker exec -it vikunja-db-1 mysqldump -u vikunja -pmyPass vikunja > vikunja-backup.sql
1 Like

That’s pretty much the way to go about it.

I’ve built a tool specifically for usage with docker to make this a lot easier: konrad/docker-db-backup - docker-db-backup - Gitea