Exporting and Backing Up your Node-RED Nodes

This post shows how to export your Node-RED Nodes.

This is useful if you need to:

  • Backup your Node-RED flow
  • Move your flow to another Raspberry Pi (or machine)
  • Share your Node-RED project with others

Example

Imagine that you had the following nodes in your flow:

exporting Node-RED

You would need to click the deploy button on the top-right corner to save your application.

7 - Deploy Your Application

Then you would select with your mouse all the nodes that you wish to export and they would be highlighted in orange (as shown below):

Learn Raspberry Pi, ESP8266, Arduino and Node-RED. This is a a step-by-step course to get you building a real world home automation system using open-source tools DOWNLOAD »

Learn Raspberry Pi, ESP8266, Arduino and Node-RED. This is a a step-by-step course to get you building a real world home automation system using open-source tools DOWNLOAD »

select Node-RED nodes

Exporting

Now with the nodes highlighted, you open the top Menu, go to Export and select Clipboard.

export

A new window opens. Copy the text that appears and save it.

export nodes

This is how the text looks for the flow demonstrated in this example:

[{"id":"b9884d5c.5211e","type":"inject","z":"2a15e348.a7c6dc",
"name":"","topic":"","payload":"hi","payloadType":"str","repeat"
:"","crontab":"","once":false,"x":294,"y":123,"wires":[["cb6af
000.5a3e6"]]},{"id":"cb6af000.5a3e6","type":"debug","z":"2a15e
348.a7c6dc","name":"","active":true,"console":"false","complet
e":"false","x":447,"y":123,"wires":[]}]

Importing

Now you could go to another Raspberry Pi or a machine that has Node-RED installed and you could simply import your flow.

You only have to go to the Import menu and paste your nodes in text format (as show below).

import

Important: If you have previously installed extra nodes (for example Node-RED Dashboard), you’ll also have to install those nodes in your new machine, otherwise the Import process will not work.

Download our Free eBooks and Resources


Learn how to program and build projects with the ESP32 and ESP8266 using MicroPython firmware DOWNLOAD »

Learn how to program and build projects with the ESP32 and ESP8266 using MicroPython firmware DOWNLOAD »


Enjoyed this project? Stay updated by subscribing our weekly newsletter!

1 thought on “Exporting and Backing Up your Node-RED Nodes”

  1. I want to save quite ofter as a backup, so I optimized the save process. Create a bookmarklet with this URL, and run it once every session. This creates the new button “Save to file”. Enjoy it.

    Here’s the code: javascript:(function(){ $(‘#clipboard-dialog-copy’).after(‘Save to file’); $(‘#exportToFileButton’).click(function() { var uri = ‘data:text/csv;charset=utf-8,’ + escape($(‘#clipboard-export’).val()); var fileName = JSON.parse($(‘#clipboard-export’).val())[0].label; var linkField = document.createElement(“a”); linkField.href = uri; linkField.style = “visibility:hidden”; linkField.download = fileName + “.json”; document.body.appendChild(linkField); linkField.click(); document.body.removeChild(linkField); }); })();

Leave a Comment

Download our Free eBooks and Resources

Get instant access to our FREE eBooks, Resources, and Exclusive Electronics Projects by entering your email address below.