Losing flows from changing of device name

So I recently was tasked to do a project, and Node-red was involved in it.
I had to change the name of my device to download another software, but after changing when I launch my Node-red all of my previous flowcharts are gone. Is it really gone or can I retrieve it with "~/.node-red."
Is it possible that by changing the device name it will erase my temporary files, it being my flows?

Erase? It should not.

Node-red pre V2 loads a flow file based on host name.

If you change the host name it tries to load a different flow file.

Look in ./node-red folder for flows_?oldhostname?.json - your flow is in there.

You can Permanently fix the flow name by modifying settings.js or by passing the name of the flow file in as an argument.

So theoretically speaking it shouldn't be missing or rather it cannot be missing just by the action of changing one's computer device name. It should be in one of the files

Correct to both :slight_smile:

1 Like

ahhh I see... Wheww scared me, I thought 6weeks of hardwork was going to go down the drain like that

Backup NOW :slight_smile:

Ahh As it is a insituition property I do not have it now with me, so I need to wait till tomorrow when I am at the lab then I can find it. But Thanks man!!!

What would you have done if the disc had failed?

I would have restarted the project that my senior spent 6 months on and finish it in 2-4weeks

I assume you have now learnt a lesson and started making regular backups.

As @Steve-Mcl said you can add a permanent name in the settings.js file. In addition you can pass the name in when starting Node-RED using:
node-red your_flow_name.json
allowing you to have different flows to use
node-red my_first_flow.json
node-red bosses_flow.json
node-red my_test.json

You could also setup node-RED to use projects.

1 Like

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