All flows have disappeared

Hi everyone,
the flows I was working on in Home Assistant have disappeared... can anyone tell me if there is a valid reason?
And, above all, is it possible to recover them?
Thanks

That depends on several things.

What have you done (like re-installed anything, deployed empty flow by mistake? done any more deploys since then)?

The problem with HA node-red plugin is that it runs node-red in a docker container. That means your flow files are not really on your host OS, but rather packed away inside a virtual machine (kinda) and as such, need to persisted outside of the container if they are to survive a reboot. If this was not setup correctly, then potentially a simple restart of the container has caused all files to be lost.

NOTE: this is an implementation HA chose and nothing to do with Node-RED (many, if not most users on the forum install Node-RED themselves, directly on the OS, and as such have direct access to the flows files for backup / security reasons)

Thanks for the reply.
I have installed HassOS.
How can I solve the problem to which you refer?

option 1: install node-red locally/directly on the OS (not using the HA node-red plug-in)
option 2: ask on the HA forums why your flows were not persisted

NOTE: if you simply made a mistake and deployed an empty flow, none of the above will help you. Though on a normal installation, if you have NOT done another deploy, then there will be a .backup flow file in your node-red user directory with your previous flows.
image

but where that is on a docker container - you will have to ask on HA forum

NOTE: as you have provided too little information to help further. (e.g. what did you actually do to get into this position) i cannot help much more.

  1. Excuse me, what should I do to install node-red locally/directly on HassOS?

There is no .backup file in the node-red directory:

image

I actually reinstalled HassOS from a backup on GDrive.
So, I assume, the node-red .backup file was never generated... correct?
Is there any setting to enable to make backups in node-red?

Sorry, no idea. Most folk here do not use HA - you will need to ask this on the HA forums.

Looks that way, but as i dont have access to all of the information (like which folder you are showing me, where your node-red actually saves flows, how HASS have things setup etc) I cannot say. On a normal installation, it is written right next to the active flows.json file just like my screenshot.

It is automatic. And it occurs when you make a deployment. By ths looks of your screenshot, assuming it is the right location/path, then I think you have lost it due to the container not having a persistent mapping to the OS filesystem. Again, I must point out, this will be due to either how HA sets this all up or the actions you have taken.


My recommendation: uninstall the HA Node-RED plugin and simply install directly to the OS.

Once installed directly to the OS, you can, if you need to install node-red-contrib-home-assistant-websocket (node) - Node-RED to communicate with HA.

The install instructions have been posted many times and are written in the node-red docs too.


If instead, you wish to continue using Node-RED as a HA plugin, you should ask these questions on the HA forum.

There are no files beginning with dot, which suggests that your file explorer is not set to show hidden files.
What is in flows.json?

OK, thanks a lot!
You were very kind.
I'll ask in the HA forum.
In the meantime I'm trying to understand how to install node-red directly on HA

Hi, I haven't used node-red for a long time.
Today, after the publish it created the .backup
Thanks