Hi community,
I’m facing a data migration problem and need some advice.
I have two separate nodes running with Docker Compose, and I want to merge them into a single Kubernetes cluster. Both nodes are using version 2.2.4, but they have different workflows, credentials, and configurations.
I have already migrated the first node into a Kubernetes pod using an SQL dump, and it worked perfectly. However, I’m not sure how to correctly merge the data from the second node.
For the second node, I used the n8n CLI export/import functionality, but I’m not confident that this approach will merge all data correctly without conflicts or data loss.
Is there a recommended or best-practice way to merge data from multiple n8n instances into one Kubernetes cluster?
Any guidance or experience would be greatly appreciated.
1 Like
As written here CLI commands | n8n Docs
”When exporting workflows and credentials, n8n also exports their IDs. If you have workflows and credentials with the same IDs in your existing database, they will be overwritten. To avoid this, delete or change the IDs before importing.”
Usually this should not be an issue since the entities use UUIDs in n8n,
but better to check before importing.
And as always…have backups of both instances available!
Thanks for the explanation.
Yes, I’ve seen this mentioned in the documentation. However, during the import I did not truncate any tables beforehand. When I ran the import via the CLI, it reported that some tables were not empty and therefore skipped importing data into those tables.
Because of this behavior, the import didn’t overwrite existing records but ignored entities where the tables already contained data. That’s why I’m trying to understand whether this approach is safe enough, or if there is a better recommended way to properly merge data from two instances without risking data loss or inconsistencies.
I do have backups of both instances, of course 