N8n login/folder/db migration

Describe the problem/error/question

I wrote myself a script that migrates creds and workflows from one n8n container to another. Additionally, the cred key from the old instance is written into the new n8n, so I can use the creds right away. Everything works fine so far.

On the new instance, however, I still need to log in initially, and I also don’t have the folders in which my workflows were structured.

Is there a way to migrate both of these via the CLI as well?

The background is that I want to switch from SQLite to Postgres. I could use an external tool, but I can’t assume that such a tool is installed or allowed to be installed on every server. I’d prefer to handle the migration using only n8n’s built-in tools.

Thanks for your help.

What is the error message (if any)?

‘export:database’ (suggested bei GPT) –> not found

Please share your workflow

It is more an infrastructure than a workflow issue.

Information on your n8n setup

  • n8n version:
    1.111.0
  • Database (default: SQLite):
    from SQLite to Postgres
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
    selfhosted Docker with Coolify
  • Operating system:
    Ubuntu

Hey @Colin_Schmidt,

At the moment the CLI only exports workflows and credentials it doesn’t do the other parts, That is where the environments feature would be handy.

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