We have an old Metabase server, version v0.24.1.
In its day it was installed by people who are no longer in the company and we don't have documentation, so we don't know if it is configured against mysql or if it uses its own database.
In /opt/Metabase we have these files:
4.0K Apr 5 10:49 .
4.0K Aug 25 2021 ..
208K Apr 4 18:18 metabase.db.mv.db
187 Apr 4 18:17 metabase.db.trace.db
104M May 16 2017 metabase.jar
85M May 15 2017 metabase.jarold
4.0K May 15 2017 plugins
It seems that it uses the H2 database for the initial configuration, since it appears modified today.
The idea we have is to set this up from scratch, in a Docker. But we don't know how to do it. We have seen that it could be possible to take the metabase.db.mv.db file and put it in the Docker path. That with that the configuration would be migrated.
This is the docker command we are testing:
docker run -d -p 1500:3000
--name metabase metabase/metabase
When we run it, in /metabase2/metabase.db it creates two files:
If we move these two files from /opt/Metabase to /metabase2/metabase.db be enough?
It definitely does not look like
metabase.db.mv.db is where your data is. It's only 208KB.
Unless your instance was almost unused for many years, but then there should be almost no data either, so not even worth migrating.
Yes, the file was updated today, but could it be that you are messing around with things and possibly created that file at some point?
But before you do anything, then make sure to do a backup first.
You should absolutely not be using H2. Make sure you migrate away:
And then setup Docker pointing to that application database:
I've managed to figure out that it's using MySQL. Is there a way to check in the Metabase configuration which database, MySQL has several, it's using?
@mgfeal Only on newer versions. You should see activity in the table
query_execution if you try to run a query in Metabase, which will tell you if you are looking in the correct application database.
You would have to figure out how Metabase is started on the server. Perhaps it was setup as a service, so it is getting the environment variables from a service file? https://www.metabase.com/docs/latest/operations-guide/running-metabase-on-debian.html