# All flows have disappeared

**URL:** https://discourse.nodered.org/t/all-flows-have-disappeared/86000
**Category:** General
**Tags:** home-assistant
**Created:** [28 February 2024 13:45 UTC](https://discourse.nodered.org/t/all-flows-have-disappeared/86000 "2024-02-28T13:45:42Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![Obi-Wan](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/obi-wan/32/88727_2.png) [@Obi-Wan](https://discourse.nodered.org/u/Obi-Wan)
#### Post date: [28 February 2024 13:45 UTC](https://discourse.nodered.org/t/all-flows-have-disappeared/86000/1 "2024-02-28T13:45:42Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [28 February 2024 14:42 UTC](https://discourse.nodered.org/t/all-flows-have-disappeared/86000/2 "2024-02-28T14:42:34Z")

</div>

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)

---

<div class="post-metadata">

### Author: ![Obi-Wan](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/obi-wan/32/88727_2.png) [@Obi-Wan](https://discourse.nodered.org/u/Obi-Wan)
#### Post date: [28 February 2024 14:46 UTC](https://discourse.nodered.org/t/all-flows-have-disappeared/86000/3 "2024-02-28T14:46:37Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [28 February 2024 14:49 UTC](https://discourse.nodered.org/t/all-flows-have-disappeared/86000/4 "2024-02-28T14:49:35Z")

</div>

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](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/3/63540e0f127f4d12d935eac6af6f8a1df4fbe3f4.png)

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.

---

<div class="post-metadata">

### Author: ![Obi-Wan](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/obi-wan/32/88727_2.png) [@Obi-Wan](https://discourse.nodered.org/u/Obi-Wan)
#### Post date: [28 February 2024 15:02 UTC](https://discourse.nodered.org/t/all-flows-have-disappeared/86000/5 "2024-02-28T15:02:43Z")

</div>

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](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/b/cbcec3c69cdac66d49074e7c47364325cb3b4fd7.png)

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?

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [28 February 2024 15:10 UTC](https://discourse.nodered.org/t/all-flows-have-disappeared/86000/6 "2024-02-28T15:10:35Z")

</div>

> [@Obi-Wan](#):
>
> I actually reinstalled HassOS from a backup on GDrive.  
> So, I assume, the node-red .backup file was never generated... correct?

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

> [@Obi-Wan](#):
>
> So, I assume, the node-red .backup file was never generated... correct?

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.

> [@Obi-Wan](#):
>
> Is there any setting to enable to make backups in node-red?

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](https://flows.nodered.org/node/node-red-contrib-home-assistant-websocket) to communicate with HA.

The install instructions have been posted many times and are written in the [node-red docs](https://nodered.org/docs/getting-started/) too.

* * *

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

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [28 February 2024 15:35 UTC](https://discourse.nodered.org/t/all-flows-have-disappeared/86000/7 "2024-02-28T15:35:54Z")

</div>

> [@Obi-Wan](#):
>
> There is no .backup file in the node-red directory:

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?

---

<div class="post-metadata">

### Author: ![Obi-Wan](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/obi-wan/32/88727_2.png) [@Obi-Wan](https://discourse.nodered.org/u/Obi-Wan)
#### Post date: [28 February 2024 18:25 UTC](https://discourse.nodered.org/t/all-flows-have-disappeared/86000/8 "2024-02-28T18:25:57Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Obi-Wan](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/obi-wan/32/88727_2.png) [@Obi-Wan](https://discourse.nodered.org/u/Obi-Wan)
#### Post date: [28 February 2024 18:29 UTC](https://discourse.nodered.org/t/all-flows-have-disappeared/86000/9 "2024-02-28T18:29:17Z")

</div>

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

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [28 May 2024 18:29 UTC](https://discourse.nodered.org/t/all-flows-have-disappeared/86000/10 "2024-05-28T18:29:20Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
