[RESOLVED] - How to get Query and Dashboard back when updating from 0.34.3 to 0.35.3 (Docker/W10)

Hello,

I would like to update my Metabase with Docker on Windows and can’t figure out how to get my queries and dashboard back in this new version / new container while following the documentation.

I have done a backup of my previous “DB contents” : docker cp <id container>:/metabase.db /tmp/
(In C:/tmp)

After, I tried this command given in the documentation but can’t figure out how to set it properly in my case : docker run -d -v ~/my-metabase-db:/metabase.db --name metabase -e MB_DB_FILE=/metabase.db -e MUID=$UID -e MGID=$GID -p 3000:3000 metabase/metabase

By seeing the “~” I could guess that command isn’t meant for Windows.

I have done many attempt with this command and the best I could get is a container not starting (it exit(1) in a sec) with addgroup: invalid number '$GID' adduser: invalid number '$UID' su: unknown user metabase.

I can’t really figure out what is this MUID and MGID and if I need to change something or not. Documentation isn’t really clear about that.

So after some try I had a “little succes” with this command: docker run -d -p 3000:3000 -v /tmp:/tmp -e "MB_DB_FILE=/tmp/metabase.db" --name metabase metabase/metabase:latest

Now I am able to recoverer my “old session” into my new Metabase 0.35.3 (I can connect on 0.35.3 to my DB without having to setup again, I just have to give my mail and password and I’m in)BUT, I have no query or Dashboard…

I dont understand how to get it done.

I have found a lot of subject around this but every time the answer is “read the documentation” or random command.

I hope I’m just a noob and I missed something because I find it very very hard to do something as simple as an update.

Thank you for your help

Emmanuel

Hi @emmanuel92250
I would highly recommend that you migrate away from H2 and then upgrade afterwards:
https://www.metabase.com/docs/latest/operations-guide/migrating-from-h2.html

Hi flamber,

Thank you for you answer.

I dont have any H2 db. I have a Postgressql and I did remove the H2 sample db a while back.

I have never used the H2 at all.

@emmanuel92250
I think you’re misunderstanding. Metabase uses H2 for the internal application database by default. That’s what MB_DB_FILE is referring to.
https://www.metabase.com/docs/latest/operations-guide/configuring-application-database.html

Migrate away from H2, then you don’t need MB_DB_FILE, MUID, MGID nor the -v volume.

You only need MB_DB_CONNECTION_URI="postgres://<host>:<port>/<database>?user=<username>&password=<password>"
And then it doesn’t matter what you do to the Metabase container, since all the data is stored on Postgres (or MySQL if you prefer).

@flamber,

Thank you for this precision. I din’t understand it that way.

I will follow your advice and let you know the outcome.

Thank you

@flamber,

Indeed, it work ! Problem solve.

Thank you for your time and your clear answer!

I found that the documentation should be more clear about the use of H2 as Metabase provide also a H2 sample database. I was really confused and thinked I wasn’t in a case where metabase use H2…

I struggled also to find where to give the command to do the migration by following your link https://www.metabase.com/docs/latest/operations-guide/migrating-from-h2.html.
I finnaly tried to used the CLI inside Docker Desktop and it work just fine.

Emmanuel

1 Like