Migrating from H2 on Mac Local Metabase


I am running Metabase locally on my Mac. It kept crashing, so I am trying to migrate from H2 to postgres. I have an up-to-date version of java and I have installed postgres using home-brew.

The database I am trying to connect has SSL turned on. I run the following commands:

export MB_DB_TYPE=postgres
export MB_DB_DBNAME=*db_name*
export MB_DB_PORT=5432
export MB_DB_USER=*username*
export MB_DB_PASS=*password*
export MB_DB_HOST=*host*
java -jar metabase.jar load-from-h2 metabase.db

but get the following error:
org.postgresql.util.PSQLException: FATAL: no pg_hba.conf entry for host "*host*", user "*username*", database "*dbname*", SSL off

How do I indicate that the SSL is on?

Thanks in advance

Hi @nicola
You need to use MB_DB_CONNECTION_URI instead - so something like this should work: