Problems with installation for proof of concept

We have been able to install Metabase using the built in db on Ubuntu Docker following the guide on the Metabase home page. However the installation isn't even reboot persistent.

Our proof of concept has the following requirements:

  1. Create a somewhat stable development environment.
  2. The environment needs to include examples.
    3 The environment should be reboot persistent und use Postsql.
  3. In a next step, we need to load csv data and demonstrate sthe ability to use our data,
  4. Next step: Demonstrate sql joint capabilities!

How can we convert our docker installation? I have seen some online guides, but they seem to be incomplete or simply don't work.

Any help is appreciated. Thank you!

Hi @jst68
If you are using the built-in H2 database, then that's your problem. Have a look here:
https://www.metabase.com/docs/latest/installation-and-operation/running-metabase-on-docker#production-installation

Hi @flamber,
Thank you for responding to me.
I have installed Postgresql, stopped my instance, exported the existing H2 db to a newly created folder in my home directory ~/metabase,
However, I am getting java errors on step 4 of this guide:
https://www.metabase.com/docs/latest/installation-and-operation/migrating-from-h2

Should I try the whole process again to see if I have made a mistake somewhere? The first part is quick to do.

I actually used the same guide to get to the current point following the " Open Source quick start" section.

@jst68 If you don't write the errors you are seeing, then it's impossible to know what the problem is.

Hi @flamber,

Sorry, my mistake, Here you go!

Warning: protocol #'java-time.core/Amount is overwriting function abs
WARNING: abs already refers to: #'clojure.core/abs in namespace: java-time.core, being replaced by: #'java-time.core/abs
WARNING: abs already refers to: #'clojure.core/abs in namespace: java-time, being replaced by: #'java-time/abs
WARNING: sun.reflect.Reflection.getCallerClass is not supported. This will impact performance.
2022-09-14 21:58:31,851 INFO metabase.util :: Maximum memory available to JVM: 2.9 GB
2022-09-14 21:58:34,442 INFO util.encryption :: Saved credentials encryption is DISABLED for this Metabase instance. 🔓
 For more information, see https://metabase.com/docs/latest/operations-guide/encrypting-database-details-at-rest.html
WARNING: abs already refers to: #'clojure.core/abs in namespace: taoensso.encore, being replaced by: #'taoensso.encore/abs
WARNING: abs already refers to: #'clojure.core/abs in namespace: kixi.stats.math, being replaced by: #'kixi.stats.math/abs
WARNING: abs already refers to: #'clojure.core/abs in namespace: kixi.stats.test, being replaced by: #'kixi.stats.math/abs
WARNING: abs already refers to: #'clojure.core/abs in namespace: kixi.stats.distribution, being replaced by: #'kixi.stats.math/abs
2022-09-14 21:58:38,236 INFO driver.impl :: Registered abstract driver :sql  🚚
2022-09-14 21:58:38,239 INFO metabase.util ::  ⮦ Load driver :sql took 66.7 ms
2022-09-14 21:58:38,244 INFO driver.impl :: Registered abstract driver :sql-jdbc (parents: [:sql]) 🚚
2022-09-14 21:58:38,247 INFO metabase.util :: Load driver :sql-jdbc took 77.1 ms
2022-09-14 21:58:38,247 INFO driver.impl :: Registered driver :h2 (parents: [:sql-jdbc]) 🚚
2022-09-14 21:58:38,269 INFO driver.impl :: Registered driver :mysql (parents: [:sql-jdbc]) 🚚
2022-09-14 21:58:38,288 INFO driver.impl :: Registered driver :postgres (parents: [:sql-jdbc]) 🚚
2022-09-14 21:58:40,296 INFO metabase.core ::
Metabase v0.44.2 (8d9de8a release-x.44.x)

Copyright © 2022 Metabase, Inc.

Metabase Enterprise Edition extensions are NOT PRESENT.
2022-09-14 21:58:40,333 INFO cmd.copy :: Set up h2 source database and run migrations...
2022-09-14 21:58:40,335 INFO db.setup :: Verifying h2 Database Connection ...
2022-09-14 21:58:40,665 INFO db.setup :: Successfully verified H2 1.4.197 (2018-03-18) application database connection. ✅
2022-09-14 21:58:40,666 INFO db.setup :: Running Database Migrations...
2022-09-14 21:58:40,666 INFO db.setup :: Setting up Liquibase...
2022-09-14 21:58:41,105 ERROR cmd.copy :: [FAIL]

clojure.lang.ExceptionInfo: ERROR Set up h2 source database and run migrations...: The database is read only; SQL statement:
UPDATE DATABASECHANGELOG SET FILENAME = ? [90097-197] {}
        at metabase.cmd.copy$do_step$fn__81848.invoke(copy.clj:67)
        at metabase.cmd.copy$do_step.invokeStatic(copy.clj:63)
        at metabase.cmd.copy$do_step.invoke(copy.clj:61)
        at metabase.cmd.copy$fn__82002$copy_BANG___82007$fn__82008.invoke(copy.clj:338)
        at metabase.cmd.copy$fn__82002$copy_BANG___82007.invoke(copy.clj:331)
        at metabase.cmd.load_from_h2$load_from_h2_BANG_.invokeStatic(load_from_h2.clj:35)
        at metabase.cmd.load_from_h2$load_from_h2_BANG_.invoke(load_from_h2.clj:25)
        at clojure.lang.Var.invoke(Var.java:384)
        at metabase.cmd$load_from_h2.invokeStatic(cmd.clj:45)
        at metabase.cmd$load_from_h2.invoke(cmd.clj:39)
        at clojure.lang.AFn.applyToHelper(AFn.java:154)
        at clojure.lang.AFn.applyTo(AFn.java:144)
        at clojure.core$apply.invokeStatic(core.clj:667)
        at clojure.core$apply.invoke(core.clj:662)
        at metabase.cmd$run_cmd$fn__82799.invoke(cmd.clj:227)
        at metabase.cmd$run_cmd.invokeStatic(cmd.clj:227)
        at metabase.cmd$run_cmd.invoke(cmd.clj:218)
        at clojure.lang.Var.invoke(Var.java:388)
        at metabase.core$run_cmd.invokeStatic(core.clj:160)
        at metabase.core$run_cmd.invoke(core.clj:158)
        at metabase.core$_main.invokeStatic(core.clj:182)
        at metabase.core$_main.doInvoke(core.clj:177)
        at clojure.lang.RestFn.applyTo(RestFn.java:137)
        at metabase.core.main(Unknown Source)
Caused by: org.h2.jdbc.JdbcBatchUpdateException: The database is read only; SQL statement:
UPDATE DATABASECHANGELOG SET FILENAME = ? [90097-197]
        at org.h2.jdbc.JdbcPreparedStatement.executeBatch(JdbcPreparedStatement.java:1295)
        at clojure.java.jdbc$execute_batch.invokeStatic(jdbc.clj:598)
        at clojure.java.jdbc$execute_batch.invoke(jdbc.clj:591)
        at clojure.java.jdbc$db_do_execute_prepared_statement$fn__28510.invoke(jdbc.clj:1057)
        at clojure.java.jdbc$db_transaction_STAR_.invokeStatic(jdbc.clj:807)
        at clojure.java.jdbc$db_transaction_STAR_.invoke(jdbc.clj:776)
        at clojure.java.jdbc$db_transaction_STAR_.invokeStatic(jdbc.clj:789)
        at clojure.java.jdbc$db_transaction_STAR_.invoke(jdbc.clj:776)
        at clojure.java.jdbc$db_do_execute_prepared_statement.invokeStatic(jdbc.clj:1056)
        at clojure.java.jdbc$db_do_execute_prepared_statement.invoke(jdbc.clj:1042)
        at clojure.java.jdbc$db_do_prepared.invokeStatic(jdbc.clj:1080)
        at clojure.java.jdbc$db_do_prepared.invoke(jdbc.clj:1060)
        at clojure.java.jdbc$execute_BANG_$execute_helper__28578.invoke(jdbc.clj:1464)
        at clojure.java.jdbc$execute_BANG_.invokeStatic(jdbc.clj:1466)
        at clojure.java.jdbc$execute_BANG_.invoke(jdbc.clj:1435)
        at clojure.java.jdbc$execute_BANG_.invokeStatic(jdbc.clj:1456)
        at clojure.java.jdbc$execute_BANG_.invoke(jdbc.clj:1435)
        at metabase.db.liquibase$fn__31048$consolidate_liquibase_changesets_BANG___31053$fn__31054.invoke(liquibase.clj:192)
        at metabase.db.liquibase$fn__31048$consolidate_liquibase_changesets_BANG___31053.invoke(liquibase.clj:174)
        at metabase.db.setup$fn__35427$migrate_BANG___35432$fn__35433$fn__35434.invoke(setup.clj:63)
        at metabase.db.liquibase$fn__30951$do_with_liquibase__30956$fn__30957.invoke(liquibase.clj:59)
        at metabase.db.liquibase$fn__30951$do_with_liquibase__30956.invoke(liquibase.clj:51)
        at metabase.db.setup$fn__35427$migrate_BANG___35432$fn__35433.invoke(setup.clj:61)
        at metabase.db.setup$fn__35427$migrate_BANG___35432.invoke(setup.clj:40)
        at metabase.db.setup$fn__35486$run_schema_migrations_BANG___35491$fn__35492.invoke(setup.clj:119)
        at metabase.db.setup$fn__35486$run_schema_migrations_BANG___35491.invoke(setup.clj:113)
        at metabase.db.setup$fn__35538$setup_db_BANG___35543$fn__35544$fn__35547$fn__35548.invoke(setup.clj:145)
        at metabase.util$do_with_us_locale.invokeStatic(util.clj:716)
        at metabase.util$do_with_us_locale.invoke(util.clj:702)
        at metabase.db.setup$fn__35538$setup_db_BANG___35543$fn__35544$fn__35547.invoke(setup.clj:143)
        at metabase.db.setup$fn__35538$setup_db_BANG___35543$fn__35544.invoke(setup.clj:142)
        at metabase.db.setup$fn__35538$setup_db_BANG___35543.invoke(setup.clj:136)
        at metabase.cmd.copy$fn__82002$copy_BANG___82007$fn__82008$fn__82009.invoke(copy.clj:339)
        at metabase.cmd.copy$do_step$fn__81848.invoke(copy.clj:64)
        ... 23 more
Command failed with exception: ERROR Set up h2 source database and run migrations...: The database is read only; SQL statement:
UPDATE DATABASECHANGELOG SET FILENAME = ? [90097-197]

This is what I am getting for the following:

java -jar metabase.jar load-from-h2 /path/to/metabase.db # do not include .mv.db

I have made some progress. My Metabase installation is now running PostgreSQL. I can also manually restart when rebooting the machine. I have also tried to add the Docker restart=always environment variable when restarting Metabase, but that results in Metabase terminating after a few minutes...

Any idea why I cannot load my h2 db into PostgreSQL?

@jst68 I think you should post all the commands you make (including setting any environment variables), since you are doing something wrong, but I cannot see it.