We’ve been looking to update our Metabase docker container. Our container now is running with version 0.24.2.
Now here is the case: when i try to pull the latest metabase image from docker, the only option is to run new container with fresh start.
How can we manage to attach old metabase.db to the updated container? Or if there is some guide how to upgrade metabase vie docker without losing old data?
What kind of database are you using? If your application database is persistent you can simply stop the existing container, and start a new one with the environment variables pointing towards your database. See this page for details on how to pass environment variables. If you’re using H2, you will need to to perform a migration.
I use a script to start our container:
–name metabase metabase/metabase:v0.24.2
My steps for upgrading are:
- stop the container
- create a tar.gz of my data (safety first)
- delete the existing container
- modify the metabase version in my script
- create new container via script, but using the old data. It will auto migrate if using H2 (which we use).