NodeRED hosed after attempted update - where can I retrieve Flows?

Running on an Intel NUC:

Home Assistant 2023.8.3
Supervisor 2023.12.0
Operating System 10.3
Frontend 20230802.1 - latest

I was alerted that there was an update for NodeRed. I was running 14.4.4 and decided to upgrade to 17.0.2. I left the ‘Create backup before updating’ checked.
The upgrade seemed to complete ok, but upon launching NodeRed, None of my HA entities, devices, or areas would populate in new or existing nodes.

After a few reboots of both HA and the host, and a restore of the 14.4.4 backup,
I now get the following errors:

> node $NODE_OPTIONS node_modules/node-red/red.js --settings /etc/node-red/config.js
Error loading settings file: /etc/node-red/config.js
[14:19:23] INFO: Service Node-RED exited with code 0 (by signal 0)
[14:19:24] INFO: Starting Node-RED...
> start
> node $NODE_OPTIONS node_modules/node-red/red.js --settings /etc/node-red/config.js
Error loading settings file: /etc/node-red/config.js
[14:19:25] INFO: Service Node-RED exited with code 0 (by signal 0)
it finally times out with the 502 Bad Gateway,.

I have recreated most of the simple flows I remembered in Automations, and frankly, they seem to be running better. But there are a lot of more complicated flows that Id love to reference as I recreate them in HA automations. the Backup BTW was only 10kb, so I’m guessing that was hosed as well.

Using File editor, the * /homeassistant/node-red folder is empty :flushed:

I do have FULL backups going back several months. Where can I find the flows?? And is there an offline way to read them?

Grab one of those full backups, uncompress it, look for add-ons and grab the flow file to reimport.

I may be in real trouble here… The backups show a file host_nodered.tar.gz but its only 2kb :scream_cat: Looking inside i only see options.json.

You should check this thread (includes solutions):

1 Like

Yeah, so it appears my backups were never backing up?

Now I wonder if I can reintsall NodeRed and start all over, or if I should just stick with native HA Automations. Took me a while, but i finally got Nodered to be able to announce specific entities that were reporting a leak for instance. Im sure it can be done in an Automation, but another learning path

A great deal has happened over the past few months.

HA has been reorganised to move the Addon configuration bits out of the HA config folder and into a new /addon_configs/. Pre this all the Node-RED stuff (ie flow file) was backed up with the HA backup, not the Addon backup. The move, a sensible one, has caused a few issues in itself. I think the answer is, look in old HA backups for your NR flow file, and also check to see that the NR addon update has created the necessary folders and moved your existing stuff forward. Your flow files might be in the new place.
I guess too, that whilst the addon update includes the move from HA to the new addon_config, it will not be able to reverse this action by itself.

The Node-RED addon has moved forward quite a bit, and 17+ now includes Node-RED 3.1.3. Along with this the WebSocket nodes have moved and there are several breaking changes - you need HA 2023.12+ to start with.

I assume too that you will need to revisit your Node-RED companion integration.

Good luck!

1 Like

I’m not trying to be snarky but please make sure you test your backups / recovery methods to ensure they work. The worst time to discover they are bad is when you need them.

1 Like

You are spot on!
sad that the UI leads you to believe you can restore just the incremental NodeRed from the System|Backups. It does nothing. If i get time, i’ll open a ticket. they could have included a .txt file in teh backup explaining what they had done!

So, while I want to move as much as i can to native HA automations (seems faster and history shows which automation triggered something other than just Supervisor) I can at least restore the flows to see what I had :slight_smile:

Thanks!