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.

1 Like

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

1 Like

sure, thanks. :smiley:

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

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

1 Like

same here.
metabase.db.mv.db ~50MB
metabase.db.trace.db ~7.5GB

trace file keeps growing around 0.5GB per week.

running metabase version 0.33.2.

Looks like effort to clean up H2 database are not working.

@ezs_jd The only recommendation is not to use H2.
https://www.metabase.com/docs/latest/operations-guide/migrating-from-h2.html
And metabase.db.trace.db will not be cleaned up - it’s the log of H2 problems. If you don’t care about it, you can just delete it.
Your data is stored in metabase.db.mv.db

Hey!

My trace file is growing too!
How can I stop it? Can I delete the trace file?
I have a lot of database there. For example the syslog db from all my server and syslog from my firewall contains a lot of logs but 17 GB is a lot of data only for metabase.

Regards!
DxAnotaci%C3%B3n%202020-04-28%20093742

@ddixan Like mentioned many times. Just delete the trace file, but better yet, migrate away from H2:
https://www.metabase.com/docs/latest/operations-guide/migrating-from-h2.html

We’re running version 0.35.3. I have been watching the trace file for a few months now. No more bloating!

I’m aware of all the warnings for using Postgres, I just haven’t had the time to fully understand the migration steps and make that happen, so I’m just glad H2 seems to be running smoother these days.

@ezs_jd What part of the migration steps is it you don’t understand?

it’s been a while, don’t remember! Just know I didn’t feel comfortable going through with it at the time.