What these files are metabase.db.mv.db and metabase.db.trace.db

Dear All,

I’m using jar verstion of metabase and running it using java -jar metabase.jar.
its uses H2 database by default.

I have added oracle Datasource for creating some dashboard and questions. day by day the file metabase.db.mv.db is keep on incresing. if I remove this file all my saved dashboards and questions will be deleted.

I have to reduce this file size without losing the dashboards. I have created 35 questions and 5 dashboards will this take 13 GB of space?

Please help me to reduce the space of this file or help me to take a backup of dashboards and questions which I saved.

Thanks,
Sridhar. B

They’re the H2 database that stores all the Metabase information.
Migrate to MySQL or Postgress if you’re using Metabase for anything more for evaluation.

Hi @bsridhar85

metabase.db.mv.db is the default internal H2 database used for metadata, logins, settings, query history, …
It is not recommended for production. You should use migrate to Postgres or MariaDB/MySQL.
https://www.metabase.com/docs/latest/operations-guide/start.html#migrating-from-using-the-h2-database-to-mysql-or-postgres

metabase.db.trace.db is a debug log - should only be a few kilobytes in size.

And it sounds like you’re using an older version, since 0.32 has new features that tries to cleanup the H2 database.

Hi,
I managed to reduce the db file metabase.db.mv.db. but want know how to reduce size for metabase.db.trace.db. Please help…!!!

Remove the file, when Metabase is stopped, since just a H2 debug log.
But it would be even better to use a proper database instead of H2.

I have a similar situation. My metabase.db.mv.db is just 59MB where as my metabase.db.trace.db is 1.5GB. What will happen if I just delete my metabase.db.trace.db and keep metabase.db.mv.db?

I do not need any query logs from the past but have to save user data, pulses, questions, etc…

@r-maya
The metabase.db.trace.db is a debug/trace log - it’s not the query log - so it should be okay to remove that file.
The query logs are stored in metabase.db.mv.db - including all other metadata.

You should migrate away from H2:
https://www.metabase.com/docs/latest/operations-guide/migrating-from-h2.html

sure, thanks. :smiley:

So, metabase.db.trace.db can be deleted directly.
image

@aggi
I only have a single recommendation. Migrate away from H2:
https://www.metabase.com/docs/latest/operations-guide/migrating-from-h2.html

1 Like