I have installed Metabase 0.44 on my Synology NAS via Docker to analyze my ERP (running on the NAS on MariaDB10) few weeks ago and started building questions, love the program so far!
I want to upgrade to 0.45 but realize I'm not clear with the explanations from the "Upgrading Metabase" page. Since I have already linked my ERP DB to Metabase (and deleted the H2 database):
- are my questions and Metabase setup automatically stored on the ERP's DB, or are they somewhere else in Docker?
- is it safe then to upgrade to 0.45 directly, or should I save the Metabase setup first (and how)?
Many thanks in advance and sorry to ask such a simple question!
Without knowing how you have setup Metabase initially, then it's difficult to say.
All Metabase data is stored in the "application database":
Post "Diagnostic Info" from Admin > Troubleshooting.
sorry for very delayed answer! Here is diagnostic info, I see there is still an H2 database, although I had deleted it from tables. I see the instructions to upgrade from Docker but don't really understand how to do, will ask a professional to do it for me, thanks for your answer.
"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.2 Safari/605.1.15",
"vendor": "Apple Computer, Inc."
"java.runtime.name": "OpenJDK Runtime Environment",
"java.vendor": "Eclipse Adoptium",
"java.vm.name": "OpenJDK 64-Bit Server VM",
"version": "1.4.197 (2018-03-18)"
"name": "H2 JDBC Driver",
"version": "1.4.197 (2018-03-18)"
What this means is that the H2 database is the current application database. You need to first migrate from H2 to Postgres or MySQL (so you take the data out of the container) and then you can upgrade the current Metabase
Hi @Luiggi thanks for your answer!
Yes, I'm clear with the conceptual idea, just not too sure how to do it as there is a terminal in docker, but it doesn't seem to react to my commands, and I'm not sure how to connect the mySQL data then... will work on it!
Did you transfer the database successfully? I also have the same problem as you
no I didn't manage, I'm waiting for a friend to help me before I upgrade!
@Luiggi @flamber Hi,
I'm still learning how to do the migration (time is on my side ), now I understand how to interact via terminal, I have successfully backed up the current H2 database, and followed the instructions for a migration (to mySQL). I have put my version of Mettable (0.44.3) into the same folder as the backup of my database, created a new empty DB with mySQL, navigated there via the terminal, but I'm stuck at this stage:
### 4. Run the migration command
Create another copy of your H2 file that you extracted from the container when you backed up your app db (step 2).
From the directory with your H2 file and your Metabase JAR, run the migration command,
load-from-h2. Use the appropriate connection string or environment variables for the target database you want to migrate to. The command would look something like:
java -jar metabase.jar load-from-h2 /path/to/metabase.db # do not include .mv.db
Metabase will start up, perform the migration (meaning, it’ll take the data from the H2 file and put it into your new app db, in this a Postgres db), and then exit.
You can find details about specifying MySQL and Postgres databases at Configuring the application database.
My problem is that the instruction is not very detailed for mySQL, I tried to simply say load-from-h2, but it doesn't do anything. Should I replace all Postgres by mySQL and run the command?
- The credential in the first part of the script should be the ones for the database I copied and put in the folder with the install file for Metabase right?
- I have the address but why a 5432?
- and in the second part path to metabase db is the path to the mySQL db I just created?
Again, sorry as those are very basic questions!
I found the solution, thanks to people who gave me some advice before!
I had to :
install Java on the NAS,
spend time understanding how environment variables work,
tinker with phpmyAdmin to setup the proper permissions on the user accessing the database.
Overall, I would say that the Metabase installation guide could be simplified to let newbies like me understand better