Backup and Restore

I have a node-red application that has been growing for some time.
It works on windows 10 and controls several PLCs on a industrial envinorment.
I make daily backups of the all application (example: c:\hmi_1880), but when I test the same application on another pc, simple just by copying the folder and install node.js and npm I face many complications. What is the best and reliable way (if exists) to make the backups and restore without copy all the flows, one by one.


I'm not familiar with the windows structure, but......

Copy all the .j* files to another directory.

I think it is basically - given you are in the node-red directory:

copy *.j* c:\somewhere_else

If you get what I mean with the c:\somewhere_else

Can you explain what the complications are? Usually, as long as you copy the whole userDir folder (minus the node_modules folder) and do an npm install in the userDir folder on the target, everything should work other than if you have some hardware configuration that is different (e.g. serial ports) or have hard-coded something into your flows that only works on the source (e.g. some kind of IP address maybe).

Thanks for the answers.

I also thought it was as simple as just copying files between directories, and then install node js and node-red.
I tried several times and the problem persist. Does not have nothing to do with drivers or ip address. I think the problem is in the node-red.

  1. Node-red versiona: v2.1.1 and v2.2.2.
  2. Node js versions: 12.19.0 and 16.14.2
  3. The dark theme desapears (strange and don´t accept it anymore)
  4. Some of the ui_text, ui_charts (dashboards elements) disappeared, no matter what I try?

Conclusion, just part of the app works on the new pc. Unless something is missing it´s not a linear process.

Question: Is all configurations files in the app folder? How can I access json files direct?
Is there a way to clean all the files related to node-red previous instalations?

When moving your installation from one system to another, these are the steps i would recommend...


  1. Backup everything in .node-red except node_modules folder


  1. Install git, nodejs & node-red
  2. Run node-red & make sure it works as expected
  3. stop node-red
  4. Copy the files backed up from OLD to NEW
  5. run npm i inside the .node-red folder
  6. Start node-red and test.

NOTE: If your flows are not loaded, it is probably due to the name of them. If they are named something like OldDellPC.json & OldDellPC_creds.json then rename them to flows.json and flows_creds.json then start node-red again.

Thanks again.
I forgot to say that my folder app is not .node-red but something like c:\hmi_App.
If I´m right the ".node-red" folder is the default folder where node-red install the first app.
So I just have to backup my "c:\hmi_App", right ?

when we say your .node-red folder, we mean the folder that was created the first time you ran node-red.

It can easily be determined by looking at the node-red startup log...

Referred to as the userDir folder since this is what it is called in the docs.

Well that's just general stuff that you've installed that are different versions. Both should be fine. But if you want both machines to be the same, obviously, you have to keep the environment updated.

I so rarely do anything with the theme that I always forget. In settings.js the specifies the location of the CSS for the theme. If it isn't working, the CSS file is probably specified using an absolute path and that is different on the other machine.

Where you are referencing paths and files, you do, of course, need to make sure that the references work on both machines.

We would have to see the specifics, I don't use Dashboard much so I'm not sure what is going on there.

It is a "linear process" as I think you conceive of it. But you do have to understand the rules. This isn't specific to Node-RED of course.

No, all of the configuration is in the userDir folder, ~/.node-red by default. With the possible exceptions:

  • Where you are running Node-RED automatically. There will be OS specific configuration.
  • Where you are referencing hardware, there may again be OS specific configuration.

Define "direct"? In Node-RED, the OS, ... ?

Of course, you can simply delete the userDir folder and everything is gone.

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