Can I restore accidentally deleted flow

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?

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
cp ~/.node-red/flows.json ~/.node-red/flows-temp.json
  1. copy the backup file back
cp ~/.node-red/.flows.json.backup ~/.node-red/flows.json
  1. restart Node-RED
1 Like

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

How did you delete it?

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! :pray:

What process did you go through to delete it?

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

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

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