# Made a real ballsup, broke my NR

**URL:** <https://discourse.nodered.org/t/made-a-real-ballsup-broke-my-nr/9885>\
**Category:** General\
**Created:** [8 April 2019 02:52 UTC](https://discourse.nodered.org/t/made-a-real-ballsup-broke-my-nr/9885 "2019-04-08T02:52:32Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![kenkoknz](https://avatars.discourse-cdn.com/v4/letter/k/58956e/32.png) [@kenkoknz](https://discourse.nodered.org/u/kenkoknz)\
**Post date:** [8 April 2019 02:52 UTC](https://discourse.nodered.org/t/made-a-real-ballsup-broke-my-nr/9885/1 "2019-04-08T02:52:32Z")

</div>

Hi All,  
HW:pi  
NR version: v0.20.5

I was doing a new install on pi to boot on usb stick instead of sd card. Successfully installed, I was going to test it out for a few days before transferring it to a usb ssd and have pi boot from the ssd.  
I was playing with it for a few days and added several tabs and flows all going good, oled, broadlink, wemo, etc all working good...  
Until I made a real a balls up! I was mucking with the ds18b20 node and set the period (sec) to 0 and when I hit deploy the session just locked up.  
This is the setup for the ds18b20 taken from another pi with correct setting.

![ds18b20](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/b/bf6624a7fdb59592ac5ef106052979fa1836ba09.jpeg)

I rebooted the pi and now all my flows and tabs on NR is gone (3 days work)!  
And no, I do not have any backup...  
I presume that NR was tied up in a infinite loop of some sort and on reboot recovered somehow deleting all the flows and tabs to clear the infinite loop (a clever strategy on developers part, perhaps?).

Before i do further damage is there a way to recover the tabs and flows?  
Thanks,  
Ken  
ps lesson, always back up all flows

---

<div class="post-metadata">

**Author:** ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)\
**Post date:** [8 April 2019 03:48 UTC](https://discourse.nodered.org/t/made-a-real-ballsup-broke-my-nr/9885/2 "2019-04-08T03:48:31Z")

</div>

Why would your flows be gone ?

`node-red-stop`  
`node-red --safe`

Your flows will not run and you should be able to make changes.

Look at the `flows` files in:  
`cd ~/.node-red`

---

<div class="post-metadata">

**Author:** ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)\
**Post date:** [8 April 2019 06:40 UTC](https://discourse.nodered.org/t/made-a-real-ballsup-broke-my-nr/9885/3 "2019-04-08T06:40:54Z")

</div>

The chances are that on reboot your pi picked up a new name and therefore started a new flow file. But you old flows file will still be in you .node-red directory.

You can start up node red specifying which flow file to use which would stop this happening in the future. How to specify the.file is in the documentation

---

<div class="post-metadata">

**Author:** ![kenkoknz](https://avatars.discourse-cdn.com/v4/letter/k/58956e/32.png) [@kenkoknz](https://discourse.nodered.org/u/kenkoknz)\
**Post date:** [8 April 2019 08:01 UTC](https://discourse.nodered.org/t/made-a-real-ballsup-broke-my-nr/9885/4 "2019-04-08T08:01:00Z")

</div>

Hi ukmoose,  
Thanks for the tips, listed all the flows file:

 ![flows_flie](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/5/513c048d45bdea417aa429abcf3eb53af1902c2e.jpeg)

I take it that the flow is in `flows_raspberrypi.json`, what are the flows\_raspberrypi\_cred.json?

---

<div class="post-metadata">

**Author:** ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)\
**Post date:** [8 April 2019 08:08 UTC](https://discourse.nodered.org/t/made-a-real-ballsup-broke-my-nr/9885/5 "2019-04-08T08:08:47Z")

</div>

The flows\_{name}\_ _cred_ . _json_ file contains the encrypted credentials

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [8 April 2019 09:20 UTC](https://discourse.nodered.org/t/made-a-real-ballsup-broke-my-nr/9885/6 "2019-04-08T09:20:58Z")

</div>

so the .backup files are the previous versions... so a one level back version. ie we save existing to the backup - then write the latest. So one or the other version should contain most of your work.
