Liking cljdoc? Tell your friends :D
Clojure only.

metabase.cmd.load-from-h2

Commands for loading data from an H2 file into another database. Run this with lein run load-from-h2 or java -jar metabase.jar load-from-h2.

Test this as follows:

# Postgres
psql -c 'DROP DATABASE IF EXISTS metabase;'
psql -c 'CREATE DATABASE metabase;'
MB_DB_TYPE=postgres MB_DB_HOST=localhost MB_DB_PORT=5432 MB_DB_USER=camsaul MB_DB_DBNAME=metabase lein run load-from-h2

# MySQL
mysql -u root -e 'DROP DATABASE IF EXISTS metabase; CREATE DATABASE metabase;'
MB_DB_TYPE=mysql MB_DB_HOST=localhost MB_DB_PORT=3305 MB_DB_USER=root MB_DB_DBNAME=metabase lein run load-from-h2
Commands for loading data from an H2 file into another database.
Run this with `lein run load-from-h2` or `java -jar metabase.jar load-from-h2`.

Test this as follows:

```
# Postgres
psql -c 'DROP DATABASE IF EXISTS metabase;'
psql -c 'CREATE DATABASE metabase;'
MB_DB_TYPE=postgres MB_DB_HOST=localhost MB_DB_PORT=5432 MB_DB_USER=camsaul MB_DB_DBNAME=metabase lein run load-from-h2

# MySQL
mysql -u root -e 'DROP DATABASE IF EXISTS metabase; CREATE DATABASE metabase;'
MB_DB_TYPE=mysql MB_DB_HOST=localhost MB_DB_PORT=3305 MB_DB_USER=root MB_DB_DBNAME=metabase lein run load-from-h2
```
raw docstring

load-from-h2!clj

(load-from-h2! h2-connection-string-or-nil)

Transfer data from existing H2 database to the newly created (presumably MySQL or Postgres) DB specified by env vars. Intended as a tool for upgrading from H2 to a 'real' Database.

Defaults to using @metabase.db/db-file as the connection string.

Transfer data from existing H2 database to the newly created (presumably MySQL or Postgres) DB specified by env
vars. Intended as a tool for upgrading from H2 to a 'real' Database.

Defaults to using `@metabase.db/db-file` as the connection string.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close