Deleting flows.json e.g. exchange with another one

I'm running node-red (Version 1.3.7) along with iobroker (Adapter Version 2.4.1).
I try to exchange the flows.json with another file which was prepared on
another system.
After every restart of the node-red the old file is still present.
Same issue when i delete the flows.json or empty it.
Thanks for any suggestions.

When you say that you restart node-red are you restarting it or re-booting?

Show us what the folder contents look like before you remove flows.json and what it looks like after removing that file and what it looks like after restarting node-red (not re-boot).

Hi, I'm working in the same issue, see the sequence of directory contents:
Old flows.json file:
Screenshot 2022-02-02 163000
node red instance stopped and flows.json deleted:
Screenshot 2022-02-02 163052

Sorry have to put the rest in additional posts :wink:

node red restarted:
Screenshot 2022-02-02 163140
node red instance stopped, flows.json replaced with new file:
Screenshot 2022-02-02 163301

node red instance started:
Screenshot 2022-02-02 163344

We are wondering where the old flows.json content is coming from.
Has nothing to do with "pretty" setting, the smaller flows.json file is missing flows which are present in the bigger one.

Any idea?

Sorry, I'm limited to max 3 replies so have to edit a previous one.

We're controlling Node-Red via ioBroker simply by starting/stopping the instance:

There is nothing in Node-RED that would write to the flows file on startup. Something must be doing that outside of Node-RED.

How do you start/stop Node-RED?

The reason why the flows.json is replaced every time you start the iobroker instance is,
that the content of the flows.json also resides in the iobroker database.
So the solution is to stop the instance and delete the content of the
array "flows": [ ... ] in the iobroker database.
Then you can exchange the flows.json and restart the instance.
After the start the content of the flows.json will be copied in the iobroker database again.

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