Error while migrate database from one unix server to another

I’m using a unix server with metabase. I have the database and would like to migrate the database to another production server.
When I start the service on the new server, I have an error.

“ERROR metabase.task :: Error initializing task :metabase.task.sync-databases/SyncDatabases”

If somebody could help me.
Thank you.

Hi @alexkava85
Which version of Metabase?
When you say you have the database - do you mean the Metabase internal metadata database?
Or are you talking about the datasource, which you’re querying?

Hi flamber,

Thanks for your quick answer.
I’m using v 0.32.10.
I’m talking about the batabase of Metabase. Not the ones I want to visualize data.


Okay, which database are you using for metadata?
When you migrate the database from one server to another, then the only thing you need to change in Metabase is the environment variables that has the database host details and credentials.

I’m using H2 database.
I changed the environment variables so that Metabase could connect MySQL.
Do I have to change the environment variables first keeping H2 database, then convert into MySQL ?



Okay, if you’re using H2, then you just move the file (normally called to your production server.

But then you say, that you have changed the variables, so now you’re using MySQL.
Then just make your production server variables point to that MySQL.

I’m not sure what you’re trying to do, can you explain in more details what your current setup is?

Yes, sorry it’s not so clear. Let just forgot about MySQL for now.

I moved the file on my production server.
Then I started metabase (java -jar metabase.jar) on the production server with the database in the same folder than metabase.jar (V.0.32.10). That’s when I received the Error mentionned in my post.


Okay, I would think that it’s failing to do the sync because your production server cannot connect to one of the datasources (Admin > Databases).
Is the Error initializing task error, the only error you see?
Are you using the exact same version (0.32.10) on your test-server and production-server?

Indeed, on my production server, I tried a ping on a IP where I have a database (datasource admin-> database) and the ping return nothing. Whereas when I tried the ping on my test server, I received a response. I think the problem comes from my firewall, I’ll try some tests and post back quickly.

The version is the same (0.32.10) and this is the only error I see for the moment yes.

Thank you

1 Like