-
Notifications
You must be signed in to change notification settings - Fork 37
How to backup flows and related configuration
If Node-RED has been installed as standard, all user files should be contained in ~/.node-red unless the userDir setting has been changed in ~/.node-red/settings.js. ~ refers to the home folder of the user that runs Node-RED. (on Windows, ~ is available in PowerShell but in the older cmd shell, you should use %USERPROFILE% instead).
It is also possible to start Node-RED with parameters that override the location of the userDir (--userDir or -u) and/or the settings.js file (--settings or -s).
For full safety, everything in in the userDir should be backed up except the folder called node_modules.
Here is a list of the critical files to backup. However, it is not safe to assume this is all that is needed.
-
flows_*.json&flows_*_cred.jsonThese define the flows and any credentials stored for the flows. The
*indicates that the actual file is named after the machine name you are running on. If you have transferred from another machine name, you might have multiple files though only one set will be active. In addition, there are*.backupversions of these files. Node-RED copies the old active flow/cred files each time you deploy. -
.config.jsonThis contains the current configuration being used. Includes a list of all of the modules and node types that are being loaded with their versions.
-
settings.jsDefines the user global settings for Node-RED.
-
package.jsonIf used (will be standard from Node-RED version 0.17), defines the extra npm modules installed such as node-red-contrib-* nodes.