Avoid losing your application data (all of your questions, dashboards, collections and so on) by backing up your data.
Metabase uses a single SQL database for all of its runtime application data, so all you need to do is back up that database and you’re good to go. You can use that backup to restore your Metabase installation if anything goes wrong (like during an upgrade).
If you didn’t specify an application database using environment variables when you launched Metabase, Metabase will have created an embedded H2 database in its directory.
But if you’re at the point where you have questions and dashboards that you want to keep, you should consider migrating to a production-ready database before you upgrade.
If you’re just using Metabase for personal use and want to keep your application data, here’s what you’ll need to do.
metabase.db.mv.db) and keep that copy somewhere safe. That’s it.
java -jar metabase.jaror start the service again.
If you’re running Docker, you should already have switched to a production-ready database.
Before migrating to a production application database, you should copy the H2 app db file out of the Docker container. For example, if the container is called metabase, you’d run:
docker cp metabase:/metabase.db/metabase.db.mv.db ./
The above command would copy the database file to the directory you ran the command from. You can also create a copy of this H2 file and use it to migrate the data to a production-ready database. See Migrating from H2.
Amazon has its own best practices on how to backup and restore RDS databases, so we’ll defer to them. We recommend that you enable automated RDS Backups.
Instructions can be found in the Amazon RDS User Guide.
If you’re hosting your own PostgreSQL or MySQL/MariaDB database, simply follow the same instructions you would use for making any normal database backup. For example, if you’re using PostgreSQL for your application database, you should follow PostgreSQL’s instructions for backing up your database.
As long as you have a dump of the Metabase database, you should be good to go.