Import failure

Changed n8n from default database to a mariadb database for scaling, export worked fine, generated credentials.json and workflows.json, the import even though says sucessful, it doesn’t show up on the application. I know the database is being read correctly as n8n created all necessary tables, and when I logged in with a new user, it registered the new user on the user table.

What I’m failing to do is to import all workflows to the new database.

  • n8n version: 1.53.2
  • Database (default: SQLite): MariaDB
  • n8n EXECUTIONS_PROCESS setting (default: own, main): Default
  • Running n8n via (Docker, npm, n8n cloud, desktop app): npm under PM2
  • Operating system: Ubuntu KDE

I believe it might be something to do on how PM2 handles executions.

Hi @GabrielBackend

n8n has removed support for MariaDB as storage backends for n8n. We recommend migrating to PostgreSQL for better compatibility and long-term support.

Have you tried importing them manually? Does that work?

Thanks for the answer.

I noticed I haven’t specified that I’m trying to export/import through CLI;
I have set PostgreSQL db for n8n, although it is the same issue: export command gets all code from default storage, but import also sends to default storage instead of the new db.

I have disconnected the same n8n instance, changed enviroment variables for the db, imported, it didn’t reach db, even though n8n was looking to it, since all workflows were inexistent there.

Now I made two instances of n8n, one on default storage, the other on the db. I still haven’t figured out how to target import to the correct place.

As far as I understand, running n8n commands directly should target based on env variables set on pm2, but unfortunately wasn’t the case so far.

Even though I can just copy and paste each workflow and credential manually, it would be nice to understand what I’m doing wrong here. If there is any other info I could provide to clarify the situation.

Just to close this topic, the issue was how I set up n8n with PM2, I’m not sure how should I or if it is possible to scale like that with PM2.

Going over Docker was already planned, and so I moved to that. Having better control over containers I was able to go through exporting and importing credentials and workflows to the new db.

2 Likes

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