# Restoring a newer flow over an old one

**URL:** https://discourse.nodered.org/t/restoring-a-newer-flow-over-an-old-one/92243
**Category:** General
**Created:** [8 October 2024 17:12 UTC](https://discourse.nodered.org/t/restoring-a-newer-flow-over-an-old-one/92243 "2024-10-08T17:12:07Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Rgrove](https://avatars.discourse-cdn.com/v4/letter/r/5f8ce5/32.png) [@Rgrove](https://discourse.nodered.org/u/Rgrove)
#### Post date: [8 October 2024 17:12 UTC](https://discourse.nodered.org/t/restoring-a-newer-flow-over-an-old-one/92243/1 "2024-10-08T17:12:07Z")

</div>

## Edit: suggested topics appear to have am answer that didn't come up in a search earlier.

I had to restore a VM running Node-Red, and it has an old version of my flows.

Upon trying to import the current version of flows, I get the option to not import or import copies. There are hundreds of flows and dashboard elements, so copies would be a very bad thing...

How can I import the JSON text and have it replace everything that's a duplicate?

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/0/6080eb93b3b9abf1001b33e6fb9e85d0991198a0.png)

---

<div class="post-metadata">

### Author: ![Sean-McG](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sean-mcg/32/54677_2.png) [@Sean-McG](https://discourse.nodered.org/u/Sean-McG)
#### Post date: [8 October 2024 23:02 UTC](https://discourse.nodered.org/t/restoring-a-newer-flow-over-an-old-one/92243/2 "2024-10-08T23:02:26Z")

</div>

Why not just overwrite the flows file with the new one then ?

---

<div class="post-metadata">

### Author: ![Rgrove](https://avatars.discourse-cdn.com/v4/letter/r/5f8ce5/32.png) [@Rgrove](https://discourse.nodered.org/u/Rgrove)
#### Post date: [9 October 2024 03:49 UTC](https://discourse.nodered.org/t/restoring-a-newer-flow-over-an-old-one/92243/3 "2024-10-09T03:49:39Z")

</div>

I didn't have the flows file, just the exported JSON text. I have no idea if the contents are identical, but I don't want to break any more than has already been broken...

---

<div class="post-metadata">

### Author: ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)
#### Post date: [9 October 2024 08:42 UTC](https://discourse.nodered.org/t/restoring-a-newer-flow-over-an-old-one/92243/4 "2024-10-09T08:42:30Z")

</div>

1. stop node-red
2. go to your .node-red folder
3. look for `flows.json` rename it to `old flows.json` as a backup
4. startup NR and then import the exported file.

That should let you import the file with no duplicates.

---

<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: [7 January 2025 08:43 UTC](https://discourse.nodered.org/t/restoring-a-newer-flow-over-an-old-one/92243/5 "2025-01-07T08:43:15Z")

</div>

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