When you deploy the Node-RED starter kit, a Cloudant service instance will also be deployed. Node-RED on IBM Cloud is preconfigured to store its credential information and flow data in the bundled Cloudant. In this article, we are going to share how to backup the flow data in case of migration or in preparation for disaster recovery.
Expand Services and open the Cloudant service instance. The name is usually the same as your Node-RED app name:
Click Launch Cloudant Dashboard to view the Cloudant contents:
The flow to backup is stored in a Database with the same name as your app. Open the Database and open <Your Database name>/flow:
The flow data is in json format and its full string is within “flow”: . Copy the jsonin the section, including [ and ] at the beginning and the end, and save it as a file with .json extension. Note: Do not include “flow”: in the json file:
Step 2: Restore your Node-RED flow
Open your Node-RED app on the IBM Cloud dashboard and click Visit URL:
Click Go to your Node-RED flow editor.
Expand the top-right menu and click Import:
Click Select a file to import. Select the backup json file and click Import
By following these steps, you’ll be able to backup and restore your Node-RED flows. This can be particularly helpful in case of drastic changes, migrations, or for disaster recovery purposes.