hassio-addons / addon-node-red

Node-RED - Home Assistant Community Add-ons
https://addons.community
MIT License
540 stars 126 forks source link

After update to 16.0.1 all flows gone #1736

Closed Bloodpack closed 10 months ago

Bloodpack commented 1 year ago

Did update from 15.x to 16.0 and then to 16.0.1 and all my flows are gone. tried to restore backup from 15.x and nodered does not start anymore.

EDIT: Read about the solution here: https://github.com/hassio-addons/addon-node-red/issues/1736#issuecomment-1812437543

DieMetRik commented 1 year ago

After update from 16.0.0 to 16.0.1 flows not appear Credential error after open NR image

frenck commented 1 year ago

tried to restore backup from 15.x and nodered does not start anymore.

Did you also restore a Home Assistant backup? As the flows are stored in the Home Assistant configuration folder prior to v16

canedje commented 1 year ago

Same here!!!! After import the nodes from a back-up they are there but after restart the addon they are gone again!!! This is a big issue

herwinjan commented 1 year ago

For me to: from 15.x -> 16.0.0 -> 16.0.1 all flows are gone!

emilpirinen commented 1 year ago

Same here. Everything gone after update 16.0.0 -> 16.0.1

VOSsec commented 1 year ago

OMG! All flows are gone! 😭

Bloodpack commented 1 year ago

Did you also restore a Home Assistant backup? As the flows are stored in the Home Assistant configuration folder prior to v16

No, because i did not know the flows are not stored in nodered backup.

can i just import the flows.json from the homeassistant backup in to the nodered 16.0.1?

dannyleong74 commented 1 year ago

Same here all flow are gone after upgrage to 16.0.1. Restore back to 15.1.1 but addon could not start.

frenck commented 1 year ago

ℹ️ Please stop raising small useless comments. I will hide them if they don't add to triaging the issue or if they add things that already have been said.

removed these instructions New ones below.

../Frenck

dpgh947 commented 1 year ago

I upgraded to 16.0.1 (did not attempt 16.0.0) and still all flows gone. Restored to 15.1.1, won't start.

jossiee commented 1 year ago

Probably a dumb question but where can i find the /addon_configs/ folder?

Steini1984 commented 1 year ago

FYI did a zfs rollback on the whole VM and tried to update from 15.1.1 > 16.0.1, but still all the flows were gone after the update. Did a second rollback and sticking with 15.1.1 for now.

DieMetRik commented 1 year ago

My flows back. Stop NR Restore /config/node-red from backup Restore Addon from 16.0.1 to 15.1.1 Start NR

Mangomc commented 1 year ago

Upgraded from 15.1.1 directly to 16.0.1. Never had 16.0.0 before but All my fkows are also gone

andonevris commented 1 year ago

After that upgrade from the restored pre-v16 version directly to v16.0.1.

This doesn't work, restored my VM back to 15.x did an upgrade straight to 16.0.1 and all flows are missing.

I imported the flows manually and everything works but when you restart the addon the flows disappear again. This seems like still a bugged release, sticking to 15.x for now

henriklund commented 1 year ago

Can confirm after import it works again. But after restart of NodeRED flows are gone again.

Reverting is not an option since that does not work in my case.

frenck commented 1 year ago

Found the issue that keeps nagging this. Will create a hotfix release.

sboixg commented 1 year ago

yes same problem all flows dissapear

LsVzqz commented 1 year ago

ℹ️ Please stop raising small useless comments. I will hide them if they don't add to triaging the issue or if they add things that already have been said.

Important, v16.0.0 has an issue with credentials secret (see #1733 for the original report and the fastest resolution I could provide). That is unfortunate, but did happen and didn't show up in testing.

If you have upgraded from pre-v16 to v16.0.0 you will encounter a migration problem. To solve this:

* Restore a backup **(node-red + home assistant config as that is where the flows are stored)**

* Clear out the node-red folder in `/addon_configs/` which contains the invalid migration.

After that upgrade from the restored pre-v16 version directly to v16.0.1.

I've addressed the issue as quickly has humanly possible, but I cannot revert what has been done.

../Frenck

Hello! I'm sure this is an obvious answer, but I can't find it. How do I clear out the node-red folder in /addon_configs/? I'm using the "File editor" and I can't seem to browse to /addon_configs/

Caligo82 commented 1 year ago

Silly question, so the backup of the node-red flows is not within the actual node-red backups folder?

As answer to LsVzqz, you'd probably need to attach to the container in console to get to this folder.

canedje commented 1 year ago

Where to find backup /config/nodered? After installing backup 15.1.1 and update to 16.0.1 Nodered is not starting at all. Only install backup 15.1.1 is not starting at all

EDIT: is installing afull backup also restore the /config directory?

Caligo82 commented 1 year ago

Well that's exactly what I'm trying now, it just takes ages, as it is also restoring my db's. :D I'll get back here if it worked.

MiguelCosta commented 1 year ago

I have the same issue and restore backup is not working. Does anyone know why the restore isn't working? 😕

canedje commented 1 year ago

I have the same issue and restore backup is not working. Any knows why de restore is not working? 😕

I get it installed, but is not starting up anymore

h0bbel commented 1 year ago

I encountered the migration issue, and had no luck reverting to a backup (I forgot to clear out the addon_configs directory it seems). Anyway, I took flows.json from my backups and imported it into Node Red 16.0.1, and all seems well (Apart from missing Node-Red packages that I manually installed) but as soon as Node-Red is restarted all flows are gone again and I have to re-import my flows.json file.

henriklund commented 1 year ago

I encountered the migration issue, and had no luck reverting to a backup (I forgot to clear out the addon_configs directory it seems). Anyway, I took flows.json from my backups and imported it into Node Red 16.0.1, and all seems well (Apart from missing Node-Red packages that I manually installed) but as soon as Node-Red is restarted all flows are gone again and I have to re-import my flows.json file.

Wait for the hotfix @frenck is working on.

Caligo82 commented 1 year ago

Complete backup restore did the trick for me..., I'll wait for the fix before updating again, thats for sure. :)

I'm sure that's what @frenck was looking for today. Creating a hotfix for thousands of sweaty node-red users. Hahahaha

henriklund commented 1 year ago

I have the same issue and restore backup is not working. Does anyone know why the restore isn't working? 😕

You should have a /config/node-red.backup. You can get hold of the flows.json in that folder and use the method of import mentioned above (worked for me). Do not restart NodeRED until the hotfix is available.

henriklund commented 1 year ago

How do I clear out the node-red folder in /addon_configs/? I'm using the "File editor" and I can't seem to browse to /addon_configs/

Easiest way would be to use Addon 'Terminal & SSH' (if you know what you are doing) and then from the terminal go to /addon_configs/a0d7b954_nodered

frenck commented 1 year ago

Or update to the latest samba add-on, which has addon_configs share.

h0bbel commented 1 year ago

Just for reference, I found my flows.json file in my pre-16 backup in the _Samba_Backup_2023_11_14_0400/homeassistant/data/node-red folder.

danbayliss commented 1 year ago

Just installed 16.0.2, imported flows.json, deployed and it's all working again. Reboot is all fine too. Thanks!

Caligo82 commented 1 year ago

if your homeassistant isn't running for whatever reason, you could copy the contents of the container into the normal filesystem and extract the flows from there

frenck commented 1 year ago

ℹ️ The solution

Important, v16.0.0 has an issue with credentials secret (see #1733 for the original report and the fastest resolution I could provide) and v16.0.1 has an issue with failing to detect the migration already happened.

That is unfortunate, but it did happen and didn't show up in testing, unfortunately 😭

If you have upgraded from v15 to v16.0.0 or v16.0.1 you will encounter a migration problem.

To solve this:

  1. Restore a backup (node-red + home assistant config as that is where the flows are stored)
  2. Clear out the Node-RED folder in /addon_configs/, which contains the invalid migration. You can access this folder using the terminal add-on or using the addon_configs share provided by the Samba add-on.

Once you are back up and running on the previous version, upgrade to v16.0.2.

I've addressed the issue as quickly as possible, but I cannot revert what has been done.

I'm mostly mad at myself right now, and I'm deeply sorry this happened.

Sorry for the issue this might have caused for you 🙏

../Frenck

andonevris commented 1 year ago

I'm mostly mad at myself right now, and I'm deeply sorry this happened.

Sorry for the issue this might have caused for you 🙏

Mistakes happen, thanks for sorting it out so quickly, we appreciate it

ogghi commented 1 year ago

Shit happens, thanks for being so quick in fixing this!

Bloodpack commented 1 year ago

@frenck

thanks for the fix!!!

no need to be mad or to feel sorry, we are all humans and mistakes can happen.

Thank you for your work on the Home Assistant Project

Caligo82 commented 1 year ago

Well it's certainly a reminder to have a robust backup regime in place as for most this is now critical software in our homes. Never gets old to open the nodered page and be greeted by an empty space knowing how many countless hours went into these vanished nodes.

thanks again @frenck not only for fixing this but for all the work you put into it. Highly appreciated.

herwinjan commented 1 year ago

Thanks for all the hard work! All working again. don't feel sorry. Keep on the great job you are doing!

LsVzqz commented 1 year ago

image All, so I did the following: Uploaded a backup into home assistant, and it tells me to do a full or partial. When I select full, it then shows me the following.

stu1811 commented 1 year ago
  1. Restore a backup (node-red + home assistant config as that is where the flows are stored)

Where are the home assistant config stored or where are the flows normally stored? I use timeshift to backup my HA directories.

EDIT: Restored flows.json and packages.json from timeshift backups and all good now. Yay for backups!

steuerzentrale commented 1 year ago

2. Clear out the Node-RED folder in /addon_configs/, which contains the invalid migration. You can access this folder using the terminal add-on or using the addon_configs share provided by the Samba add-on.

first of all many thanks for the hotfix and your support for the community ! could you please precise what is meant by clearing out the Node-RED folder in addon_configs? I can access the homeassistant directory via the Samba-addon but my addons folder is empty. folders like config contain content as supposed.

Bildschirmfoto 2023-11-15 um 13 28 34
frenck commented 1 year ago

@steuerzentrale You need to update your Samba add-on to get that new share.

adepiero commented 1 year ago

The things I learned today:

h0bbel commented 1 year ago

Got 16.0.2 installed, rebooted and voilà it works again! Thanks a lot @frenck for your very speedy and quick fix, and this is a great reminder to have backups.

Always have backups!

Jalle19 commented 1 year ago

Well, at least now we know the flows are not stored in the add-on backup

sboixg commented 1 year ago

I follow the steps, is working but I can't enter to the webui of nodered, is this normal?

thanks Frenck for the quick reaction.

Caligo82 commented 1 year ago

Well, at least now we know the flows are not stored in the add-on backup

I think this would deserve a new Issue in the Node-Red addon... I mean it would be handy to have them stored there...

Edit: well this was faster than expexted. 😆

frenck commented 1 year ago

Always have backups!

100%!

Well, at least now we know the flows are not stored in the add-on backup

The cool thing is though after you have upgraded to v16.0.2, it will be.

As of v16, the backup of your flows, will be backuped with the Node-RED add-on backup 🤩

It is the whole reason for these new features, and this migration in the first place.

atifata commented 1 year ago
  1. Clear out the Node-RED folder in /addon_configs/, which contains the invalid migration. You can access this folder using the terminal add-on or using the addon_configs share provided by the Samba add-on.

Can I get some help. How do I clear the addon_configs using terminal add-on. I have terminal add-on installed. TIA