Metabase CONTAINER stop after few seconds

Metabase docker version giving me below error. Any one help me out to fix this issue

07-19 08:17:37 WARN metabase.db :: WARNING: Using Metabase with an H2 application database is not recommended for production deployments. For production deployments, we highly recommend using Postgres, MySQL, or MariaDB instead. If you decide to continue to use H2, please be sure to back up the database file regularly. See https://metabase.com/docs/latest/operations-guide/start.html#migrating-from-using-the-h2-database-to-mysql-or-postgres for more information.
07-19 08:17:37 INFO metabase.db :: Verifying h2 Database Connection …
07-19 08:17:37 INFO metabase.driver :: Initializing driver :sql…
07-19 08:17:37 INFO metabase.driver :: Initializing driver :sql-jdbc…
07-19 08:17:37 INFO metabase.driver :: Initializing driver :h2…
org.h2.message.DbException: Log file error: “/usr/share/metabase/metabase.db/metabase.db.trace.db”, cause: “org.h2.message.DbException: Error while creating file “”/usr/share/metabase”" [90062-197]" [90034-197]
org.h2.message.DbException: Log file error: “/usr/share/metabase/metabase.db/metabase.db.trace.db”, cause: “org.h2.message.DbException: Error while creating file “”/usr/share/metabase”" [90062-197]" [90034-197]

Hi @rahullad04
Which version of Metabase?
What is the Docker command for running Metabase?
Seems like there’s no write access to the path, where H2 is pointed to. Or a missing directory.

Hello

My old version v0.32.5 this. I have shifted new server where I have install latest version of metabase and trying reload old version database query. Also i have given 777 permission for database dir.

My OS version is : centos-release-7-6.1810.2.el7.centos.x86_64

Whenever I am trying start container it will kill after 40 seconds.

docker run -d -p 3000:3000 -v ~/metabase-data:/metabase-data -e “MB_DB_FILE=/metabase-data/metabase.db” --name metabase metabase/metabase

docker start

@rahullad04
Okay, that directory should be under the user who’s running the docker command.
So if me is the user, then /home/me/metabase-data would be the translation.
I really don’t like using ~, since the path changes depending on who’s running the command.
It’s strange that the error points to the trace file in /usr/share/..., when that file is located in the same directory as the H2 database.

If you’re using Metabase in production, you should really consider migrating away from H2:
https://metabase.com/docs/latest/operations-guide/start.html#migrating-from-using-the-h2-database-to-mysql-or-postgres