A better and easier way of importing/exporting flows and credentials (Backup and restore)

Hello,

This is a very important point and should be at the core of n8n.

I noticed while working with n8n ‘the self-hosted’ the importing/exporting of flows (Backup and restore) is good but for basic flows or if we have few numbers, but how we can handle the below scenarios:

  • If we have +50 flows
  • If we have +50 app credentials
  • If some flows are related to each other and linked (e.g. flow a related to flow b and so on)

It would be great if we had an easy way of handling the above scenario and reducing the complexity of this process.

The easiest way is to backup the database, as n8n stores all workflows and credentials data there. You only have to save the encryption key somewhere to decrypt it later

Hi @barn4k,

Thanks a lot for your suggestion but this is not the easy way at all because of the below:

  • Suppose that I’m not a technical person, how could I do that?
  • How to do this with different DB used (e.g. SQLite or PostgresDB)?
  • How to do this with different installations for n8n (e.g. npm, docker, server, … etc.)?

What I hope to see is something really simple for non-tech to do backup and restore without complications.

1 Like

Yeah, I’m running into this issue right now. Trying to find out how to import credentials into a new instance.

@solomon have you tried using the cli which lets you export and import all or selected workflows and credentials?

1 Like

After tweaking my workflow a little I got it working!
Will post a template later =) Thanks!

@solomon
I encountered the same issue. Could you share your template? Thank you!

This is the workflow to backup your credentials to GitHub.

To import the credentials you can create a simple workflow and use the N8N node action called “Create credential”

You can pull the files from GitHub and import the credentials. It works pretty well.

4 Likes

@solomon
Thank you for sharing the workflow, but it doesn’t work on n8n cloud. I haven’t found a solution yet.

Is there a quick video for this as it can help a lot.

Take a look at this new template:

If you have the self-hosted version, this will work well with my backup template

3 Likes

Many thanks for this. I have the self-hosted so I will definitely test it.

2 Likes