# Can I restore accidentally deleted flow

**URL:** <https://discourse.nodered.org/t/can-i-restore-accidentally-deleted-flow/58586>\
**Category:** General\
**Tags:** node-red-dashboard\
**Created:** [18 February 2022 09:08 UTC](https://discourse.nodered.org/t/can-i-restore-accidentally-deleted-flow/58586 "2022-02-18T09:08:38Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![elzup](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/elzup/32/56817_2.png) [@elzup](https://discourse.nodered.org/u/elzup)\
**Post date:** [18 February 2022 09:08 UTC](https://discourse.nodered.org/t/can-i-restore-accidentally-deleted-flow/58586/1 "2022-02-18T09:08:38Z")

</div>

I accidentally deleted an important flow while trying to delete another flow  
Undo couldn't get it back  
Deploy is done.  
Is it possible to restore?

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [18 February 2022 09:12 UTC](https://discourse.nodered.org/t/can-i-restore-accidentally-deleted-flow/58586/2 "2022-02-18T09:12:27Z")

</div>

If you have only hit deploy once then there should be a backup of the last set of flows in your Node-RED user directory.

The default flows file is `~/.node-red/flows.json`

The backup is `~/.node-red/.flows.json.backup` - note the filename starts with a `.` so is hidden by default.

1. copy `~/.node-red/flows.json` so you have that backed up safely

```auto
cp ~/.node-red/flows.json ~/.node-red/flows-temp.json

```

1. copy the backup file back

```auto
cp ~/.node-red/.flows.json.backup ~/.node-red/flows.json

```

1. restart Node-RED

---

<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:** [18 February 2022 09:21 UTC](https://discourse.nodered.org/t/can-i-restore-accidentally-deleted-flow/58586/3 "2022-02-18T09:21:39Z")

</div>

Otherwise you will have to go back to your most recent backup, if you really have deleted it.

How did you delete it?

---

<div class="post-metadata">

**Author:** ![elzup](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/elzup/32/56817_2.png) [@elzup](https://discourse.nodered.org/u/elzup)\
**Post date:** [18 February 2022 09:22 UTC](https://discourse.nodered.org/t/can-i-restore-accidentally-deleted-flow/58586/4 "2022-02-18T09:22:05Z")

</div>

I can successfully restored.  
I'm sorry I rushed to set up Topic.

Flow deletion was not saved, so it was restored when I reopened it in another tab.  
As a supplement undo with a button in the navigation (not a shortcut) was valid, but the flow was empty.

The procedure for deleting flow may not be intuitive.  
I want a confirm that displays the Flow name

@knolleary @Colin Thanks! 🙏

---

<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:** [18 February 2022 09:23 UTC](https://discourse.nodered.org/t/can-i-restore-accidentally-deleted-flow/58586/5 "2022-02-18T09:23:36Z")

</div>

What process did you go through to delete it?

---

<div class="post-metadata">

**Author:** ![elzup](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/elzup/32/56817_2.png) [@elzup](https://discourse.nodered.org/u/elzup)\
**Post date:** [18 February 2022 09:26 UTC](https://discourse.nodered.org/t/can-i-restore-accidentally-deleted-flow/58586/6 "2022-02-18T09:26:32Z")

</div>

Menu(hamburger icon ) \> flow \> delete flow  
(It may be different if it is english)

---

<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:** [18 February 2022 09:38 UTC](https://discourse.nodered.org/t/can-i-restore-accidentally-deleted-flow/58586/7 "2022-02-18T09:38:47Z")

</div>

OK, just checking that you had not just hidden it.

---

<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:** [4 March 2022 09:39 UTC](https://discourse.nodered.org/t/can-i-restore-accidentally-deleted-flow/58586/8 "2022-03-04T09:39:42Z")

</div>

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