How do I keep flows from disappearing when I power down or restart my Rpi? I don't know how to recover a flow. This doesn't seem to be consistent. I can work on a flow add nodes create functions etc. If I close my browser and re-open many times the flow that I have just worked on is gone?
When you press the Deploy button - Node-RED should update your flows.json file on the Pi that NR is running on.
What I have experienced - is that if the the SD card goes into read-only mode (as its worn out) when I actually restart my Pi - the flows are gone.
They don't go until the filing system is restarted as changes are held in RAM so you don't notice that the SD-card is in a failure mode until the filing system is restarted
Doesn't sound exactly your experience but I'd blame the Pi hardware/OS software rather than Node-RED if experiencing such issues
Add some nodes to your flow and deploy, then look in your .node-red folder and check the timestamp on the flows file is showing the time you deployed, and note the file size. Then do a power cycle (not just a reboot, a power off, wait a minute, and power on again). Then check the file timestamp and size. If it has gone back in time then chuck the SD card in the bin and start again.