Metabase.db missing - Can't migrate to Postgres

Metabase Users,
Hello and thanks in advance for any help you can provide. bow

I have a version v0.35.3 running in an Amazon Elastic Beanstalk container env. My end goal is to move from H2 to a Postgres database. Problem is, my metabase.db file doesn’t exist.

What I have done thus far?

  1. Create an EB Metabase env

  2. Went through the Metabase UI start-up menu

  3. Migrate data process

export MB_DB_TYPE=postgres

  • export MB_DB_DBNAME=metabase*

  • export MB_DB_PORT=5432*

  • export MB_DB_USER=*

  • export MB_DB_PASS=*

  • export MB_DB_HOST=localhost java -jar metabase.jar load-from-h2 /path/to/metabase.db*

Unable to find metabase.db


bash-5.0# find / -iname metabase.db


bash-5.0# ls -l /metabase.db/

total 900

-rw-r–r-- 1 metabase metabase 593920 Nov 2 17:06

-rw-r–r-- 1 metabase metabase 187 Nov 2 16:49 metabase.db.trace.db


Diagnostic Detail



“browser-info”: {

“language”: “en-US”,

“platform”: “MacIntel”,

“userAgent”: “Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36”,

“vendor”: “Google Inc.”


“system-info”: {

“file.encoding”: “UTF-8”,

“”: “OpenJDK Runtime Environment”,

“java.runtime.version”: “11.0.5+10”,

“java.vendor”: “AdoptOpenJDK”,

“java.vendor.url”: “”,

“java.version”: “11.0.5”,

“”: “OpenJDK 64-Bit Server VM”,

“java.vm.version”: “11.0.5+10”,

“”: “Linux”,

“os.version”: “4.14.186-146.268.amzn2.x86_64”,

“user.language”: “en”,

“user.timezone”: “GMT”


“metabase-info”: {

“databases”: [



“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”: “2020-04-21”,

“tag”: “v0.35.3”,

“branch”: “release-0.35.x”,

“hash”: “1d424cb”


“settings”: {

“report-timezone”: null




Hi @TomT
Make sure you have backups before doing anything.
I’m not sure how much is forum formatting messing with everything, but you need to reference like so:

java -jar metabase.jar load-from-h2 /metabase.db/metabase.db

(without the .mv.db of the file).

Hello. My freshly built system doesn’t contain the metabase.db file. The process looks straight forward, but I can’t find this file (see below).

Output from my systems…

bash-5.0# find / -iname metabase.db
bash-5.0# ls -l /metabase.db/
total 900
-rw-r–r-- 1 metabase metabase 593920 Nov 2 17:06
-rw-r–r-- 1 metabase metabase 187 Nov 2 16:49 metabase.db.trace.db

@TomT I don’t understand. If you’re migrating an existing H2, then you need to migrate from where the H2 database exist.
This is your H2 file:
-rw-r–r-- 1 metabase metabase 593920 Nov 2 17:06

Oh…thanks. This line in the documentation …" (without the .mv.db of the file)." Confused me. I thought the file I wanted was metabase.db. I will try the command again using this target file.

Quick update for others…

The command worked, but errored out. I guess it worked since I see new tables inside my RDS database.

ash-5.0# java -jar /app/metabase.jar load-from-h2 /metabase.db/
11-02 19:07:27 DEBUG plugins.classloader :: Using NEWLY CREATED classloader as shared context classloader: clojure.lang.DynamicClassLoader@188ac8a3
11-02 19:07:27 INFO metabase.util :: Loading Metabase…
11-02 19:07:27 INFO metabase.util :: Maximum memory available to JVM: 3.8 GB
11-02 19:07:38 INFO util.encryption :: Saved credentials encryption is DISABLED for this Metabase instance. :unlock:
For more information, see
11-02 19:07:44 WARN metabase.core :: WARNING: You have enabled namespace tracing, which could log sensitive information like db passwords.
11-02 19:07:44 INFO metabase.db :: Verifying postgres Database Connection …
11-02 19:07:44 INFO driver.impl :: Registered abstract driver :sql :truck:
Load driver :sql took 79.3 ms
11-02 19:07:44 INFO driver.impl :: Registered abstract driver :sql-jdbc (parents: [:sql]) :truck:
Load driver :sql-jdbc took 93.7 ms
11-02 19:07:44 INFO driver.impl :: Registered driver :postgres (parents: [:sql-jdbc]) :truck:
Load driver :postgres took 194.9 ms
11-02 19:07:44 INFO driver.impl :: Initializing driver :sql…
11-02 19:07:44 INFO driver.impl :: Initializing driver :sql-jdbc…
11-02 19:07:44 INFO driver.impl :: Initializing driver :postgres…
11-02 19:07:44 INFO metabase.db :: Successfully verified PostgreSQL 10.12 application database connection. :white_check_mark:
11-02 19:07:44 INFO metabase.db :: Running Database Migrations…
11-02 19:07:45 INFO metabase.db :: Setting up Liquibase…
11-02 19:07:45 INFO metabase.db :: Liquibase is ready.
11-02 19:07:45 INFO db.liquibase :: Checking if Database has unrun migrations…
11-02 19:07:46 INFO metabase.db :: Database Migrations Current … :white_check_mark:
Database setup took 2.7 s
Testing if target DB is already populated…
Temporarily disabling DB constraints…
org.h2.jdbc.JdbcSQLException: Database “/metabase.db/” not found [90013-197]
at org.h2.message.DbException.getJdbcSQLException(
at org.h2.message.DbException.get(
at org.h2.message.DbException.get(
at org.h2.engine.Engine.openSession(
at org.h2.engine.Engine.openSession(
at org.h2.engine.Engine.createSessionAndValidate(
at org.h2.engine.Engine.createSession(
at org.h2.engine.Engine.createSession(
at org.h2.engine.SessionRemote.connectEmbeddedOrServer(
at org.h2.jdbc.JdbcConnection.(
at org.h2.jdbc.JdbcConnection.(
at org.h2.Driver.connect(
at java.sql/java.sql.DriverManager.getConnection(Unknown Source)
at java.sql/java.sql.DriverManager.getConnection(Unknown Source)
at metabase.cmd.load_from_h2$load_data_BANG_.invokeStatic(load_from_h2.clj:161)
at metabase.cmd.load_from_h2$load_data_BANG_.invoke(load_from_h2.clj:160)
at metabase.cmd.load_from_h2$load_from_h2_BANG_$fn__68060.invoke(load_from_h2.clj:257)
at metabase.cmd.load_from_h2$load_from_h2_BANG_.invokeStatic(load_from_h2.clj:245)
at metabase.cmd.load_from_h2$load_from_h2_BANG_.invoke(load_from_h2.clj:234)
at clojure.lang.Var.invoke(
at metabase.cmd$load_from_h2.invokeStatic(cmd.clj:37)
at metabase.cmd$load_from_h2.invoke(cmd.clj:30)
at clojure.lang.AFn.applyToHelper(
at clojure.lang.AFn.applyTo(
at clojure.core$apply.invokeStatic(core.clj:665)
at clojure.core$apply.invoke(core.clj:660)
at metabase.cmd$run_cmd$fn__67316.invoke(cmd.clj:127)
at metabase.cmd$run_cmd.invokeStatic(cmd.clj:127)
at metabase.cmd$run_cmd.invoke(cmd.clj:123)
at clojure.lang.Var.invoke(
at metabase.core$run_cmd.invokeStatic(core.clj:133)
at metabase.core$run_cmd.invoke(core.clj:131)
at metabase.core$_main.invokeStatic(core.clj:155)
at metabase.core$_main.doInvoke(core.clj:150)
at clojure.lang.RestFn.applyTo(
at metabase.core.main(Unknown Source)
Command failed with exception: Database “/metabase.db/” not found [90013-197]

bash-5.0# psql -h aurora-postgresql-serverless.********* -d metabase_np_db -U root
Password for user root:
psql (11.9, server 10.12)
SSL connection (protocol: TLSv1.2, cipher: ECDHE-RSA-AES256-GCM-SHA384, bits: 256, compression: off)
Type “help” for help.

metabase_np_db=> \d
List of relations
Schema | Name | Type | Owner
public | activity | table | root
public | activity_id_seq | sequence | root
public | card_label | table | root
public | card_label_id_seq | sequence | root
public | collection | table | root
public | collection_id_seq | sequence | root
public | collection_revision | table | root
public | collection_revision_id_seq | sequence | root
public | computation_job | table | root
public | computation_job_id_seq | sequence | root
public | computation_job_result | table | root

@TomT Like I wrote, you do not include .mv.db:

java -jar /app/metabase.jar load-from-h2 /metabase.db/metabase.db

Flamber - My freshly built system does NOT contain a metabase.db file.

bash-5.0# ls -l /metabase.db/
total 1004
-rw-r–r-- 1 metabase metabase 1024000 Nov 2 19:24
-rw-r–r-- 1 metabase metabase 187 Nov 2 16:49 metabase.db.trace.db

@TomT Please read the bottom note: