After reading several topics on this type of migration, I am getting lost. I am using metabase which originaly was running on H2. I followed Metabase' guidelines to migrate to MySQL and as far as I saw, it went well....except when I restart the server, I am still using H2 according to Diagnostic Info below. Any idea what I've missed ?
I managed to follow the procedure but ended up with Nginx Bad Gateway error (which I didn't have while running H2)... why switching DB causes Nginx error ? Any idea ? (I revert back to H2 and have no problem anymore)
@flamber, so what I did is the following:
0) Creating environment variables and executing: java -jar metabase.jar load-from-h2 /path/to/metabase.db
(It created the tables within the DB just fine)
Adding the EnvironmentFile variable to metabase.service
Creating "/etc/default/metabase" with the environment variables (except I didn't know what to put on MB_JETTY_HOST AND ..._PORT)
I didn't touch nginx conf file since this was working fine with H2
@GAuber If you are migrating from H2 to MySQL, then you should not do that through a service.
It's a one-off process, which should be done completely separately from trying to run as a service.
The log in Admin > Troubleshooting > Logs should be the same as you see in the file log, if you've setup SystemD to log to a file.
@GAuber Did you ever get this figured out? I created an instance on Ubuntu using the JAR and then confirmed that it was working with H2 and Nginx. Then added the environment variables and added a reference to those variables in metabase.service and boom I get the bad gateway like you did. Comment out the reference to custom environment variables, everything works again.