Restarting Metabase With external H2 db file on Docker

I am running metabase on Docker, and using an external file to persist h2 database. I want to be able to update metabase and restart using that db file, however it always starts on an empty db.

I have tried to use

docker run -d -p 3000:3000 -v /tmp:/tmp -e "MB_DB_FILE=/myLocation/metabase.db" --name metabase metabase/metabase

while myLocation contained the backup metabase.db.mv.db

I also tried

docker run -d -p 3000:3000 -v /tmp:/tmp -e "MB_DB_FILE=/myLocation/metabase.db.mv.db" --name metabase metabase/metabase

none of them successful so far. Do you have any recommendations ?

Your MB_DB_FILE needs to be located in the shared volume.

Our startup command is:

docker run -d -p 3000:3000 -v /srv:/srv -e "MB_DB_FILE=/srv/metabase.db" --name metabase metabase/metabase:v0.22.2