Issue on installation of Metabase

Hello,

I've an issue on a metabase instance that I apparently installed in a dirty way
i've been working on this instance since 1 year so I have dashboards/cards/subscriptions/... but I've noticed that I'm on a H2 instance :

"metabase-info": {
    "databases": [
      "mysql",
      "h2"
    ],
    "hosting-env": "unknown",
    "application-database": "h2",
    "application-database-details": {
      "database": {
        "name": "H2",
        "version": "1.4.197 (2018-03-18)"
      },
      "jdbc-driver": {
        "name": "H2 JDBC Driver",
        "version": "1.4.197 (2018-03-18)"
      }
    },
    "run-mode": "prod",
    "version": {
      "date": "2021-12-16",
      "tag": "v0.41.5",
      "branch": "release-x.41.x",
      "hash": "fbfffc6"
    }

So I've tried to do :
export MB_DB_TYPE=mysql
java -jar metabase.jar load-from-h2 /path/to/metabase.db

And once this one is finished and I go the the Metabase webpage, i come back to the setup page (like a whole new instance of Metabase)

Even worse : when i kill the process of metabase and just restart it (just a "java -jar /path/to/metabase.jar"), same i arrive at the setup webpage.
Could you guide me a bit, please ? Especially where are all my cards and everything to eventually restore them in a MySQL database :confused:

Best regards,

Hi @Mor0xx
If you had configured MySQL as the application database, then you need to make sure you are doing that again. Metabase cannot guess which application database to use, you have to configure that.

You need to provide your exact commands and full logs to be able to understand what you're doing wrong.

But first off, figure out which application database actually contains you correct information. You had previously set it up to use MySQL (Resize charts of questions sent by email - #3 by Mor0xx), so it's difficult to understand if all data is still there or if you have used a H2 file (figure out which yourself) for many months.
And make sure you have backups of that.

You need to define the environment variables, when starting Metabase with MySQL as appdb.
https://www.metabase.com/docs/latest/installation-and-operation/configuring-application-database#mysql-or-mariadb

Preferably as a service: https://www.metabase.com/docs/latest/installation-and-operation/running-metabase-on-debian

When that is done, then:
Upgrade to Java 11: https://www.metabase.com/docs/latest/installation-and-operation/java-versions
Latest release is 0.44.3: https://github.com/metabase/metabase/releases/latest

Hello Flamber,

The instance of Metabase that I use is different from on of my previous post ..! We integrate Metabase to our clients that need reporting :wink:
And i don't know why but for this one I totally failed apparently

So yeah first step, how can I know which application database run all my information? It seems to be a H2 database. Is there a way to check if my datas are inside?

best regards,

@Mor0xx Without knowing the exact commands you're using, then I cannot tell.
You can run this command to find files in use

lsof | grep "mv.db"

I cannot tell if that's the H2 file where you have your database, you'll need to figure out where that is

find / -name "*.mv.db"

When you have found it, then migrate away from H2 https://www.metabase.com/docs/latest/installation-and-operation/migrating-from-h2 and setup Metabase as a service and restart your server to make sure it works correctly after reboot.

Flamber,

Thanks indeed it seems that the .db files were in /root/
So i've done the load-from-h2 /root/metabase.db and i got this error :
Command failed with exception: Error copying instances of FieldValues

What can i do, please?

@Mor0xx Start off by only working in a single directory, then you avoid having files spread everywhere.
I have no idea what the error could be. You need to provide the exact commands you are using and the full logs.