{"action":"created","issue":{"url":"https://api.github.com/repos/metabase/metabase/issues/1456","repository_url":"https://api.github.com/repos/metabase/metabase","labels_url":"https://api.github.com/repos/metabase/metabase/issues/1456/labels{/name}","comments_url":"https://api.github.com/repos/metabase/metabase/issues/1456/comments","events_url":"https://api.github.com/repos/metabase/metabase/issues/1456/events","html_url":"https://github.com/metabase/metabase/issues/1456","id":115624094,"number":1456,"title":"details on how to migrate from H2 to postgres or mysql","user":{"login":"snarfed","id":778068,"avatar_url":"https://avatars.githubusercontent.com/u/778068?v=3","gravatar_id":"","url":"https://api.github.com/users/snarfed","html_url":"https://github.com/snarfed","followers_url":"https://api.github.com/users/snarfed/followers","following_url":"https://api.github.com/users/snarfed/following{/other_user}","gists_url":"https://api.github.com/users/snarfed/gists{/gist_id}","starred_url":"https://api.github.com/users/snarfed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snarfed/subscriptions","organizations_url":"https://api.github.com/users/snarfed/orgs","repos_url":"https://api.github.com/users/snarfed/repos","events_url":"https://api.github.com/users/snarfed/events{/privacy}","received_events_url":"https://api.github.com/users/snarfed/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"camsaul","id":1455846,"avatar_url":"https://avatars.githubusercontent.com/u/1455846?v=3","gravatar_id":"","url":"https://api.github.com/users/camsaul","html_url":"https://github.com/camsaul","followers_url":"https://api.github.com/users/camsaul/followers","following_url":"https://api.github.com/users/camsaul/following{/other_user}","gists_url":"https://api.github.com/users/camsaul/gists{/gist_id}","starred_url":"https://api.github.com/users/camsaul/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/camsaul/subscriptions","organizations_url":"https://api.github.com/users/camsaul/orgs","repos_url":"https://api.github.com/users/camsaul/repos","events_url":"https://api.github.com/users/camsaul/events{/privacy}","received_events_url":"https://api.github.com/users/camsaul/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/metabase/metabase/milestones/7","html_url":"https://github.com/metabase/metabase/milestones/0.14.0","labels_url":"https://api.github.com/repos/metabase/metabase/milestones/7/labels","id":1305739,"number":7,"title":"0.14.0","description":"","creator":{"login":"salsakran","id":107439,"avatar_url":"https://avatars.githubusercontent.com/u/107439?v=3","gravatar_id":"","url":"https://api.github.com/users/salsakran","html_url":"https://github.com/salsakran","followers_url":"https://api.github.com/users/salsakran/followers","following_url":"https://api.github.com/users/salsakran/following{/other_user}","gists_url":"https://api.github.com/users/salsakran/gists{/gist_id}","starred_url":"https://api.github.com/users/salsakran/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/salsakran/subscriptions","organizations_url":"https://api.github.com/users/salsakran/orgs","repos_url":"https://api.github.com/users/salsakran/repos","events_url":"https://api.github.com/users/salsakran/events{/privacy}","received_events_url":"https://api.github.com/users/salsakran/received_events","type":"User","site_admin":false},"open_issues":0,"closed_issues":69,"state":"closed","created_at":"2015-09-15T05:55:25Z","updated_at":"2016-01-31T18:44:19Z","due_on":"2016-01-28T08:00:00Z","closed_at":"2016-01-31T18:44:19Z"},"comments":8,"created_at":"2015-11-07T01:53:01Z","updated_at":"2016-02-13T07:42:13Z","closed_at":"2016-01-20T01:03:26Z","body":"i took a stab at migrating our existing H2 db to postgres today, based on this tease at the bottom of \r\nhttp://www.metabase.com/docs/v0.12.1/operations-guide/running-the-metabase-jar-file.html#postgres :\r\n\r\n> NOTE: currently Metabase does not support migrating data from one application database to another, so if you start with H2 and then want to move to Postgres you'll have to dump the data from H2 and import it into Postgres before relaunching the application.\r\n\r\n...but i didn't get too far. has anyone over there ever tried this?\r\n\r\nthe [H2 docs](http://h2database.com/) led me to `org.h2.tools.Recover`, which gave me a full SQL dump of my db. it's definitely an H2-specific dialect, though. when i tried to load it into a postgres db with e.g. `psql -v -d metabase -f metabase.db.h2.sql`, pretty much every line errored out.\r\n\r\n`org.h2.tools.Script` also claims to dump an H2 db to SQL, but i couldn't get it to even see the H2 db file. e.g. `java -cp metabase-0.12.1.jar org.h2.tools.Script -url jdbc:h2:./metabase.db.h2.db` and variations gave me this `backup.sql` file:\r\n\r\n```\r\n;              \r\nCREATE USER IF NOT EXISTS \"\" SALT '' HASH '' ADMIN;            \r\n```\r\n\r\nif i add `;IFEXISTS=TRUE` to the jdb url, e.g. `-url 'jdbc:h2:/Users/ryan/metabase.db.h2.db;IFEXISTS=TRUE'`, i get:\r\n\r\n```\r\nException in thread \"main\" java.sql.SQLException: No suitable driver found for jdbc:/Users/ryan/metabase.db.h2.db;IFEXISTS=TRUE\r\n```\r\n\r\neven though the file is there.\r\n\r\ngoogling appropriate search terms didn't find much. let me know if you have any tips! otherwise we may have to set up backups etc for the file-based H2 db instead of migrating."},"comment":{"url":"https://api.github.com/repos/metabase/metabase/issues/comments/183616359","html_url":"https://github.com/metabase/metabase/issues/1456#issuecomment-183616359","issue_url":"https://api.github.com/repos/metabase/metabase/issues/1456","id":183616359,"user":{"login":"tmr12","id":6724099,"avatar_url":"https://avatars.githubusercontent.com/u/6724099?v=3","gravatar_id":"","url":"https://api.github.com/users/tmr12","html_url":"https://github.com/tmr12","followers_url":"https://api.github.com/users/tmr12/followers","following_url":"https://api.github.com/users/tmr12/following{/other_user}","gists_url":"https://api.github.com/users/tmr12/gists{/gist_id}","starred_url":"https://api.github.com/users/tmr12/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tmr12/subscriptions","organizations_url":"https://api.github.com/users/tmr12/orgs","repos_url":"https://api.github.com/users/tmr12/repos","events_url":"https://api.github.com/users/tmr12/events{/privacy}","received_events_url":"https://api.github.com/users/tmr12/received_events","type":"User","site_admin":false},"created_at":"2016-02-13T07:42:13Z","updated_at":"2016-02-13T07:42:13Z","body":"I am able to generate a sql dump file from h2 using `org.h2.tools.Script.process(Connection con,SQLfile_name,\"\",\"\")`.\r\nhow the generated dump file (from h2)can be uploaded into postgres?\r\nCould you please help on this if you already done the migration from h2db to postegres"}}