I'm a complete noob with Node Red, so please go easy - I have Node Red running on a RasPi 3.
I had a few flows on my Node Red when I decided to upgrade.
Unfortunately the upgrade "hung" and I had to restart it. When I eventually got Node Red upgraded, all may flows were gone. It gave me some error, but I can't remember what it was...
Is there anywhere that I can look to see of there is a backup on the RasPi? The only node I really need (although having all the flows back would be awesome) is a function Node that I cannot for the life of me remember how I "programmed" - it took sensor readings from a Sonoff POW R2, Status8 command and sent it to a InfluxDB node. But I can't get it working, hence needing the backup...
Any help would be really awesome.
Thanks in advance everyone
Like the OP all my flows, which I spent countless hours on, are gone. Stupidly I did not make a backup of any file in the ~/.node-red directory. I'll figure out a way to do this automatically, either locally or over the network, e.g. to github. If you don't make backups, consider it. Do not assume that nodejs, node-red are stable enough to not have it hit you. The alternative will be inevitably very painful and time consuming.
Thanks @TotallyInformation, appreciate the reply.
I found the flows.json file. Will this have all the old flows or only the current flows in my Node-Red?
If this will only have the current flows, is there anywhere I can try looking for older flows that may be "backed up" somewhere?
I was installing zigbee2mqtt on the same machine as node-red and the logs said there was an error with the version of node, it did not support 10.* so I tried to downgrade my node install which didn't work. I decided to install node afresh using the script
which doesn't remove the flows. Apart from that I can't tell what could have removed them, certainly my bash history shows that I didn't explicitly remove them.
The bottom line is I was kicking myself for not making regular backups. The git integration in 1.2 sounds perfect for my needs. node-red in operation has always been rock solid for me, its just the nodes/flow file integrity hasn't been reliable (this is the second time I've burnt myself! ) and that may well be node, not node-red, I just don't know at this stage. It was a shock when I realised that all my carefully curated flows were gone forever.
Mac has time machine, window has "previous versions" (unsure about linux)
Have you searched your entire computer? (PS, windows search is just terrible - dont bother)
On windows, I use a program called "agent ransack" to search whole computer for any file named *.json and to search inside that file for something I remember from my flow