Migrating from internal H2 to Postgres

Hello,

I would like to export the contents of the internal H2 database into raw SQL and import that into a Postgres database to use instead.

I have tried using the H2 driver Shell like this:

java -cp h2*.jar org.h2.tools.Shell -url jdbc:h2:/path/to/metabase.db.h2.db

and then calling SCRIPT;, but am just getting one line result:

SCRIPT
CREATE USER IF NOT EXISTS "" SALT '' HASH '' ADMIN;
(1 row, 27 ms)

Any tips on exporting the contents of the database?

also noted here https://github.com/metabase/metabase/issues/1456 (where we’ll update you if you leave a comment)

We don’t support swapping data out of the box yet =(