I would like to backup the H2 database file on my docker instance.
The documentation recommends to stop the metabase before any backup to avoid locking problems.
But I don’t know how to stop the metabase instance without stopping the container itself.
Is there a way to do this ?
Thanks for your help
The file should be in your mounted directory. I’d suggest finding it on the host system first, and verify you know where it is. Then stop the container, and back up the file.
Unfortunately I have started my container without mounted volume.
docker run -d -p 3000:3000 --name metabase metabase/metabase
Although, my aim, is to use this backup to switch on a container with a mounted volume without lost all my data…
Thanks Tom the
docker cp command made the job!
I have saved my file “/metabase.db.h2.db” on my host and successfully started a new container with this file on a mounted volume!
No need to stop the metabase instance to copy the H2 file (I haven’t encoutered any lock problems).
Thanks fo your help!