Best practice for n8n database migration

Hi,

I use n8n with docker.

I have a lot of “query is slow”.
I discovered that I can use an external database for my instance.
It seems that my issue should be fixed by changing my database.

But I don’t know how to proceed…

Do you have any advise ?

Thank you
Julien

Hi @JulienDelRio, in general the process would look like so:

  1. Export your workflows and credentials
  2. Shut down your n8n instance
  3. Configure n8n to connect to your new database
  4. Start n8n
  5. Import your workflows and credentials again

(The above does not account for execution data though, so make sure to extract that separately if relevant)

However, the cause of slow queries is often a large database. Before migrating to a new database, you may also want to ensure that you have data pruning enabled.

Thank you very much, I will follow your advises and check for pruning my data.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.