# Losing flows from changing of device name

**URL:** <https://discourse.nodered.org/t/losing-flows-from-changing-of-device-name/44875>\
**Category:** General\
**Created:** [28 April 2021 15:02 UTC](https://discourse.nodered.org/t/losing-flows-from-changing-of-device-name/44875 "2021-04-28T15:02:34Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![HappyArthur](https://avatars.discourse-cdn.com/v4/letter/h/779978/32.png) [@HappyArthur](https://discourse.nodered.org/u/HappyArthur)\
**Post date:** [28 April 2021 15:02 UTC](https://discourse.nodered.org/t/losing-flows-from-changing-of-device-name/44875/1 "2021-04-28T15:02:35Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [28 April 2021 15:07 UTC](https://discourse.nodered.org/t/losing-flows-from-changing-of-device-name/44875/2 "2021-04-28T15:07:16Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![HappyArthur](https://avatars.discourse-cdn.com/v4/letter/h/779978/32.png) [@HappyArthur](https://discourse.nodered.org/u/HappyArthur)\
**Post date:** [28 April 2021 15:08 UTC](https://discourse.nodered.org/t/losing-flows-from-changing-of-device-name/44875/3 "2021-04-28T15:08:42Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [28 April 2021 15:09 UTC](https://discourse.nodered.org/t/losing-flows-from-changing-of-device-name/44875/4 "2021-04-28T15:09:36Z")

</div>

Correct to both 🙂

---

<div class="post-metadata">

**Author:** ![HappyArthur](https://avatars.discourse-cdn.com/v4/letter/h/779978/32.png) [@HappyArthur](https://discourse.nodered.org/u/HappyArthur)\
**Post date:** [28 April 2021 15:10 UTC](https://discourse.nodered.org/t/losing-flows-from-changing-of-device-name/44875/5 "2021-04-28T15:10:32Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [28 April 2021 15:10 UTC](https://discourse.nodered.org/t/losing-flows-from-changing-of-device-name/44875/6 "2021-04-28T15:10:56Z")

</div>

Backup NOW 🙂

---

<div class="post-metadata">

**Author:** ![HappyArthur](https://avatars.discourse-cdn.com/v4/letter/h/779978/32.png) [@HappyArthur](https://discourse.nodered.org/u/HappyArthur)\
**Post date:** [28 April 2021 15:12 UTC](https://discourse.nodered.org/t/losing-flows-from-changing-of-device-name/44875/7 "2021-04-28T15:12:00Z")

</div>

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!!!

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [28 April 2021 15:31 UTC](https://discourse.nodered.org/t/losing-flows-from-changing-of-device-name/44875/8 "2021-04-28T15:31:16Z")

</div>

> [@HappyArthur](#):
>
> I thought 6weeks of hardwork was going to go down the drain

What would you have done if the disc had failed?

---

<div class="post-metadata">

**Author:** ![HappyArthur](https://avatars.discourse-cdn.com/v4/letter/h/779978/32.png) [@HappyArthur](https://discourse.nodered.org/u/HappyArthur)\
**Post date:** [29 April 2021 01:47 UTC](https://discourse.nodered.org/t/losing-flows-from-changing-of-device-name/44875/9 "2021-04-29T01:47:59Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [29 April 2021 08:47 UTC](https://discourse.nodered.org/t/losing-flows-from-changing-of-device-name/44875/10 "2021-04-29T08:47:42Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [29 April 2021 11:25 UTC](https://discourse.nodered.org/t/losing-flows-from-changing-of-device-name/44875/11 "2021-04-29T11:25:04Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [13 May 2021 11:25 UTC](https://discourse.nodered.org/t/losing-flows-from-changing-of-device-name/44875/12 "2021-05-13T11:25:21Z")

</div>

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