Issue with java -jar metabase.jar dump command in docker image


Has anyone ever tried to run the "java -jar metabase.jar dump " command in a docker instance (or better yet in a docker instance running on an ec2 instance that was created by elastic beanstalk)?

I am currently running it inside of the running docker image (because docker has the matching java version as metabase) using the following command:
sudo docker exec docker_image_name java -jar /app/metabase.jar dump metabase_20190906

The output includes the following:
09-06 20:29:39 DEBUG plugins.classloader :: Using NEWLY CREATED classloader as shared context classloader: clojure.lang.DynamicClassLoader@173a6728
09-06 20:29:39 DEBUG plugins.classloader :: Setting current thread context classloader to shared classloader clojure.lang.DynamicClassLoader@173a6728…
09-06 20:29:40 INFO metabase.util :: Loading Metabase…
09-06 20:29:40 INFO metabase.util :: Maximum memory available to JVM: 483.4 MB
09-06 20:29:46 INFO util.encryption :: Saved credentials encryption is DISABLED for this Metabase instance. :unlock:
For more information, see
09-06 20:29:53 INFO metabase.driver :: Registered abstract driver :sql :truck:
Unrecognized command: dump

The final line says that “dump” is an unrecognized command. Am I pointing to the wrong metabase.jar file? Does the newest version of metabase no longer recognize the command? Can anyone help me with pinpointing my issue?

Thanks in advance.

Hi @sjlogan
Which version of Metabase?
Where did you see that dump command?
What are you trying to do?
There’s currently work-in-progress to allow load-from-h2 and dump-to-h2, but that probably won’t be available until 0.34

HI @flamber,

Thanks for the response. I am currently on v0.33. I found this article in metabase’s documentation describing the command:

Ultimately, my goal is to replicate all of the work (dashboards, questions, etc.) I have done on an existing instance of metabase to a fresh installation of metabase. If the above described “dump” command does not work, I plan to use pg_dump, a postgres dump utility.

Okay, that feature is only part of the Enterprise Edition.
Go with pg_dump - and if you’re trying to setup multiple instances, then the API might be interesting.

Thanks for the input @flamber !

pg_dump is working fine for me. I will also spend some time looking into the API to see if that could also work for me.