How to migrate metabase instance?

Hi,

Is there any official documentation (I couldn't find it) that explain how to move metabase docker from 1 machine to another machine?

I'm using metabase docker, I know if it is docker then it should be straight forward. But if there is documentation then it would be really helpful.

I was thinking these should be enough

  1. install docker on new machine
  2. copy metabase docker image from old machine to new machine
  3. run metabase using script on new docker

Do you have other input or suggestion?

Or maybe can we just even install new metabase version on new machine.. and then just point the database connection to the old metabase database that has been used. Then we can remove / delete the old metabase docker. Will it run?

Regards

Hi @eric.halim

It really doesn't have anything to do with Metabase.
https://stackoverflow.com/questions/28734086/how-to-move-docker-containers-between-different-hosts

But yes, you can simply shutdown your existing container, startup a new container on the new host referencing the same application database and then everything will be the same.

As always - backup first!

Thanks @flamber you seem know everything about metabase

When I setup new docker on another machine. Will it use latest version? Then will it has a problem since the database connection is still using the old metabase version.

@eric.halim It will use whichever Docker image you pull - that depends on your Docker run-command
Metabase will automatically upgrade the application database during startup (it's called migrations).
The only thing you definitely should not do is have multiple active instances running different versions connected to the same application database. So shutdown other instances before starting a new instance.

I see thanks so much. But I never see any command to do that. Can you show like for example how to use the same version let's take 0.36 in this case.

So I will download metabase docker on new machine with older version of metabase. Just curious. I think I will just pull the latest metabase version later on new machine

@eric.halim I would probably recommend that you use JAR instead of Docker if you're not familiar with Docker.
You create the run-command on Docker. Metabase does not do that (or any other app for that matter).

If you want to pin the version you're using, then you define that by change metabase/metabase (which defaults to "latest") to metabase/metabase:v0.36.8.2
https://www.metabase.com/docs/latest/operations-guide/running-metabase-on-docker.html#using-postgres-as-the-metabase-application-database

I see... Many thanks @flamber