Move n8n db from SQLite to MySQL

Are there any new options on moving the SQLite db of n8n to another database like MySQL (favourite) or PostgreSQL?

I’ve already read some threads about moving to PostgreSQL by exporting and importing with the CLI, but those threads are older than a year and I want to move the complete db including Executions and tags.

I’ll hopefully move the db tonight, ass n8n got quite unresponsive in the last few hours when doing anything on the web ui which needs to load something from the db (like opening “All Executions” tab).

The disk io gets up to 60 MB/s and the CPU is completely loaded, VPS hosted at Hetzner.

The SQLite file has 7 GB at the moment.

Would really appreciate some ideas on how to move the complete db to MySQL (:

Hey @FelixL,

Export all and import all is the way to handle it, if you really need the execution history you could look to see if there is anything that will take a sqlite database dump and convert it for another type but to me honest most of the time unless it is for compliance the execution history isn’t needed.

If you keep the sqlite file you can also always manually query it in the future if needed.

Hi @Jon,

Yep, that’s what I did tonight. I just wanted to if moving to MySQL makes a difference performance wise.
And to be honest all data which is in the execution history and is needed for later reference should be just automatically saved into a database directly when workflow runs ^^

Hey @FelixL,

Moving to something like MySQL would likely help although I think Postgres works better :slightly_smiling_face: