Harald Uebele
Harald Uebele

Reputation: 264

Node-RED on Bluemix: Where are the flows?

Normally, Node-RED flows are stored somewhere in the filesystem, in a file named flows_XXX.json.

When running Node-RED on Bluemix where are they stored? This could be important if your node instance doesn't start anymore.

Upvotes: 2

Views: 929

Answers (4)

v.bontempi
v.bontempi

Reputation: 1562

As described by Harald in a previous answer once you create an instance of nodered boilerplate it is bound to a cloudant nosql instance for data, instead of the classic json file: this because a file on the filesystem would be reset as soon as your application restarts, while a db service persists. So if you wish to retrieve your application flows once it isn't able to start anymore, you have to access the cloudant nosql dashboard and extract the data locally.

Upvotes: 1

Harald Uebele
Harald Uebele

Reputation: 264

A Node-RED instance on Bluemix when created from the Node-RED boilerplate always comes with a Cloudant database service connected.

  1. Open the Cloudant dashboard
  2. Open the database nodered
  3. Open the document <app_name>/flow (Use the edit icon to open it)
  4. You can now copy all the flows from this Node-RED instance. Simply remove this part from the beginning:

{ "_id": "HUe-IoT-RED/flow", "_rev": "6-3813d11089aa3e3adb9e704d4251bcdd", "flow":

and the tailing }

Everything between the [ ] are the flows. They can be imported into another Node-RED instance.

More info on Node-RED website and Node-RED GitHub repo

Upvotes: 4

Crescenzo Migliaccio
Crescenzo Migliaccio

Reputation: 1249

Generally when the node-red instance doesn't start anymore (if something is changed, etc.), you can 're-push' the starter - code on your old bugged application. So, the app is 'resetted' as the first time, but you don't lose the flows, cause they are stored in a Cloudant DB.

Upvotes: 1

hardillb
hardillb

Reputation: 59628

For the boilerplate install all data including flows is persisted to the bound cloudant database.

Details can be found in the node-red-bluemix repo - https://github.com/node-red/node-red-bluemix

Upvotes: 2

Related Questions