Node red addon data rescue

I have messed up my hassio OS on my raspberry pi (it now keeps on rebooting without giving me a chance to ssh access) and need to resetup the system.
Before that I need to save some configurations from the disk that werent backed up recently.
I have found my home assistant configuration.
But I cannot figured out where the node red addon stores the flows on the sdcard.

Could anyone help me finding them on the SDcard?

I am running
core-2021.5.3
supervisor-2021.04.3
on a

Raspbian GNU/Linux 10 (buster)
Docker version
20.10.6

The node red data directory is mapped from the addon container to the host directory. I checked portainer for the node red addon and it says its data folder is mounted as /mnt/data/supervisor/addons/data/a0d7b954_nodered on the host. That final directory might have a different “code” in front for you but should say node red.

According to the node red forum, you need the package.json, settings.js, and flow files (usually flow.json I believe) to restore a backup.

Here’s the full mappings if you need them

unfortunately I dont have /data in /mnt. Just three folders I used to mount stuff from a past reilio synch installation. With the help of your folder mappings I searched for supervisor and addons.

sudo find -name supervisor
./var/lib/docker/overlay2/4556866034c771a1200a2b7835b02c3144a0065e3d42869c41e4ef945a04fc43/diff/usr/src/supervisor
./var/lib/docker/overlay2/4556866034c771a1200a2b7835b02c3144a0065e3d42869c41e4ef945a04fc43/diff/usr/src/supervisor/supervisor
./var/lib/docker/overlay2/6bf2427182e72a83d2ffba3b65645170ef92b382e282eccdfd6f3f9d7a67345e/diff/etc/services.d/supervisor
./var/lib/docker/overlay2/d4aa34e452c1978ab71108841cf01d43eb39ed42f62ce88e187444aa302536f5/diff/run/s6/services/supervisor
./var/lib/docker/overlay2/d4aa34e452c1978ab71108841cf01d43eb39ed42f62ce88e187444aa302536f5/diff/run/supervisor
./var/lib/docker/overlay2/d4aa34e452c1978ab71108841cf01d43eb39ed42f62ce88e187444aa302536f5/diff/etc/services.d/supervisor
./var/lib/docker/overlay2/0d0ef24bf0766b8b9d6abb34a2aeae2b200a322e27d890ae25c62787df71859c/diff/usr/src/supervisor
./var/lib/docker/overlay2/0d0ef24bf0766b8b9d6abb34a2aeae2b200a322e27d890ae25c62787df71859c/diff/usr/src/supervisor/supervisor
./var/lib/docker/overlay2/0d0ef24bf0766b8b9d6abb34a2aeae2b200a322e27d890ae25c62787df71859c/diff/usr/src/supervisor/rootfs/etc/services.d/supervisor
sudo find -name addons
./usr/share/vim/addons
./usr/share/hassio/addons
./var/lib/docker/overlay2/4556866034c771a1200a2b7835b02c3144a0065e3d42869c41e4ef945a04fc43/diff/usr/src/supervisor/supervisor/addons
./var/lib/docker/overlay2/8910df079c1482ac8689b35d94da2771ca6077db22b2d7311fc60656adc0d1a4/diff/addons
./var/lib/docker/overlay2/0d0ef24bf0766b8b9d6abb34a2aeae2b200a322e27d890ae25c62787df71859c/diff/usr/src/supervisor/supervisor/addons
./var/lib/docker/overlay2/06411948af0eac65889446ff59bf4df0a78ef9062f1c857e827b322acdc6fbf7/diff/usr/share/vim/addons
./var/lib/vim/addons

The folder /usr/share/hassio/addons looked promising, I found /usr/share/hassio/addons/data/a0d7b954_nodered. But that only contains options.json.

It’s ery strange the addon folder is not mapped somewhere obvious. Any further ideas I could try?

I think I found it.
everything was located inside my home assistant folder at:

usr/share/hassio/homeassistant/

backing up this folder gets all the configuration data of all addons.

That’s good you found it. I run Node red in docker vs the addon version and it appears the Home Assistant addon version significantly modifies where the files for node red are persisted/stored, and are in multiple directories. All my node red files are together in one folder using the node red official docker image.

This was my very first raspi homeassistant and nodered setup. This time around I wont be doing it the same way either. Whenever possible I’ll install nodered and alike directly in docker and not as hassio addon. Because of the reasons you just highlighted. Thanks for the help

If you go that route, I followed this guide which was very helpful to install and link node red docker to Home Assistant.

FWIW I have been running NR separately (ie. not the addon) for a few years, and am thinking of switching to the addon. I initially had the view that it’s better to have separate capabilities rather than dependencies. However, when you have with lots (NR, MQTT server, Portainer, etc, etc), it ends up being a lot of maintenance and different backup routines. And when HA was less stable I didn’t want to auto-update addons, but now it’s an asset. And everything gets backed up with the google drive backup addon.

Someone else recently asked about switching from a container install to homeassistant os with the addons. There’s advantages and disadvantages to both ways, which we spoke about in that thread which is worth checking out. In the end, they decided to stick with their homeassistant container install.

this is super helpful, thank you