After update to 16.0.0 all flows and notes are gone

My HA instance does local and Google drive full backups daily.

I selected the Full Backup of HA on whatever day it was that NodeRed was pre 16, and did a full restore to that (it was only a couple days ago).

My HA instance came back online while out doing errands.

I returned several hours later to re-read this thread to proceed with an attempt to update NR to 16.02

NR was running and I exported all flows to json.

I then went to HA Add-Ons to initiate an update, only to find that NR was already at 16.02

It had come back online with the 15.x version and proceeded to auto-update to 16.0.2 (apparently skipping past 16.0.0 and 16.0.1)

I didnā€™t need to touch the addon_configs directory.

1 Like

If you have a node red folder in your addon config folder (sorry I canā€™t remember the right name right now) the rename on-donā€™t delete it it probably has your flows. Thereā€™s a way to import it apparently (someone mentioned it in one of the responses this morning)

Maybe?

somehow it is included in my node red 16.0.1 backup file, which I tried to upgrade to 16.0.2 and never thought of opening it to look for this file.
Itā€™s renamed .flows.json.backup, I hope this information can help others who couldnā€™t find his ā€˜flow.jsonā€™ in previous full backup files.

1 Like

Same here!? AAARGH! All gone! What!?

This worked for me:

Node red 16.0.2 installed on HASS

Using the samba share \backup, I copied a range of the .tar files there.

I looked for the most recent tar file with a size in megabytes (I suspect those are backups created by a HASS update).

Inside one of those big, recent .tar files, I found \homeassistant.tar.gz\homeassistant.tar\data\node-red\ which contained a flows.json file - containing my flows (you can confirm first by opening with a text editor).

I copied that file out, returned to node red in HASS, and used ā€œImportā€ - flows.json: from the node-red interface top right hamburger menu.

My flows were restored and seem to be working - thanks to all gods that might be, and the resilience of HASS.

Good luck!

Thank you it did work and immediatly disengaged auto-update.

1 Like

Iā€™m sorry, I didnā€™t mean to be rude or anything since I donā€™t know the circumstances. It was just some frustration and you gave an explanation. So, thanks for the explanation and sorry for my frustration relief :slightly_smiling_face:

1 Like

Oh i get it and none takenā€¦

Its been a happy fun time the last 24 hasnā€™t it?

Today Iā€™m hoping I at least get through one cup of coffee before something explodes.

Like unintended consequences now we are getting our configs backā€¦

1 Like

FWIW, the ā€œHome Assistant Google Drive Backupā€ add-on has been invaluable to me over time. It was a lifesaver in this instance and should be running on every HA installation. I long-ago learned that my gradual complacency means that backups do not happen when they are needed. Using the ā€œFull Backupā€ option, it has repeatedly saved me from my own errors and made a for a one-click correction of this one. I note a recent flurry of users buying the developer a virtual coffee so I suspect it helped others also.

4 Likes

I think the ā€œbetterā€ solution is to have your HA on some kind of VM (virtual machine) and to take regular snapshots of your setup. This will allow you to backup not only HA but the entire operating system as well.

I remember a year or two ago, they made a change to the HA OS that prevented it from booting up all the way. I had to wait a day for any kind of response on how to fix the issue. Luckily it was an easy fix, but it made start taking snap shots of my setup (Iā€™m using ESXi). I have stopped doing that since, because they eat up disk space, but its a really good safety net in case the backup solution is not working well for you.

1 Like

I did start a new thread for this because I have a slightly different problem though very similar. @NathanCu directed me here. My system which has been running pretty well for 18 months suddenly at around 7:30pm GMT yesterday lost all contact with my TRVā€™s. but was still feeding data from other devices and still allowing control of lamps and switches from my Node-Red Dashboard. Iā€™m running the Node-Red Add-on in HomeAssistant in a Virtualbox VM on Linux Mint.

My obvious problem was that any flow which did file read or writes to my own data files in /config denied the existence of the file. Home Assistant File Editor and VM Code through Samba Share both confirmed the existence of the files and the integrity of the data within them. (I say all I did find one which was accessible from a flow - see later).

I didnā€™t document what I did (Iā€™m 75 yrs old btw) but went through a process of more and more severe restarts, Node_Red, Then Home Assistant, Then VirtualBox and finally Linux all with no result.

I copied the config directory to a location on my Windows Client and then re-installed Node-Red . I canā€™t remember whether I competed all outstanding add-on updates before or after re-installing Node Red but do recall seeing 15.1 become 16.0.

I had many similar issues - Node Red stubbornly refusing to start with this same error described above
by @WarMasterNL showed an attempt to load modules from /etc/node-red/config.js

When it finally did start in File Editor the base directory was /homeassistant and not /config. This reverted to /config after restoring an 3 week old backup. Still, files in /config were not accessible by Node-Red. I applied all the updates again but still no joy.

Most of my dashboard is once again available but parts of the flows which rely on transfer of data through files do not work correctly. At no time have I had to restore my flows from anywhere other than as part of the full HA Restore.

I loaded the Readdir node into my palette and this paints the picture. The /config that Node-Red is pointing to is different from the one accessed directly in HA. The HA one has 91 files and 12 subdirectories. The one seen by Node-Red has 18 files

Thoughts anyone?

your answer starts at post 9 and continues on from there. (Yes itā€™s a big thread thereā€™s 4-5 solutions depending on how youā€™re setup)

We know how to fix it if you tell us what you have - do you have a recent FULL backup AND a recent Node red Backup available?

My most recent backup is 19 days old but thatā€™s ok - I can redo the work I had done since then. I donā€™t have a Node-Red backup. I have 16.0.2 loaded. I also have a copy of the config file but it is after the Node-Red subdirectory was emptied

K - your actual configuration was stored inside the Homeassistant Core backup (in /config/node-red/ PRE 16.x so if you can locate it - that will do.

You may also have a copy of that folder now at /addon_config/(wierdslug)_node-red/

If you do - rename that - donā€™t delete it - itā€™s your stuff.

Thanks. Itā€™s late here now Iā€™d better look at that after Iā€™ve slept

1 Like

You are a lifesaver!! This worked!! thanks!

1 Like

So no lie I am not a programmer and I have bumbled my way through getting home assistant up and running and doing various things by video and pure luck but this has me stumped. I have found what I think is the back up using studio code but I am not understanding how to restore it.

Just noticed this tonight, when the light timers werenā€™t working as expected. This was an easy fix. Reverted to 15.1.1, blew away the ā€œnewā€ config, copied the old back over, and Bobā€™s your uncle. Thanks!

1 Like

You just reminded me that I did not buy that cup of coffee for him. It has been saving my night once already. Probably will do it a couple of more times when I break stuff.

1 Like

Snapshots are not backups :slight_smile: I also run my HA on VMware. Try using Veeam, they have a free community edition which allows you to do backups based on snapshots.