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)
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.
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.
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
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.
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.
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
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
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!
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.
Snapshots are not backups 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.