# In which situations would Node IDs change ? Import or any other as well?

**URL:** <https://discourse.nodered.org/t/in-which-situations-would-node-ids-change-import-or-any-other-as-well/65500>\
**Category:** General\
**Created:** [23 July 2022 12:01 UTC](https://discourse.nodered.org/t/in-which-situations-would-node-ids-change-import-or-any-other-as-well/65500 "2022-07-23T12:01:06Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![SandeepA](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sandeepa/32/63225_2.png) [@SandeepA](https://discourse.nodered.org/u/SandeepA)\
**Post date:** [23 July 2022 12:01 UTC](https://discourse.nodered.org/t/in-which-situations-would-node-ids-change-import-or-any-other-as-well/65500/1 "2022-07-23T12:01:06Z")

</div>

Hi,

I have a query , in which situations does the ids of flows and nodes changes ?  
I was under impression that import changes the IDs.  
So i exported a flow. Deleted it . And then imported it - but IDs remain same.  
(I have checked only flow IDs and not each node ids).

So wanted to understand which all situations will the ID change ?

(if importing a copy - i understand) but any circumstances ?

If i send a flows.json to someone and he imports it to blank NR will it change the ids ?

---

<div class="post-metadata">

**Author:** ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)\
**Post date:** [23 July 2022 14:02 UTC](https://discourse.nodered.org/t/in-which-situations-would-node-ids-change-import-or-any-other-as-well/65500/2 "2022-07-23T14:02:21Z")

</div>

As you say, a normal export / import will retain the IDs.

If just one node ID in the export already exists on the target machine and you "Import a copy", _all_ IDs will be changed.

If it's a complete flows.json file you want to transfer, isn't it best to replace the file in ~/.node-red with the one you send then restart? Assuming you already have the same nodes installed, that is.

---

<div class="post-metadata">

**Author:** ![SandeepA](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sandeepa/32/63225_2.png) [@SandeepA](https://discourse.nodered.org/u/SandeepA)\
**Post date:** [23 July 2022 19:06 UTC](https://discourse.nodered.org/t/in-which-situations-would-node-ids-change-import-or-any-other-as-well/65500/3 "2022-07-23T19:06:56Z")

</div>

Thank You so much @jbudd  
So technically no reason for "complete import on blank NR" or "import of a flow to an instance NR which has flows but not the one being imported (including its nodes) " - then the ids will be retained.

Thank You so much.

---

<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:** [21 September 2022 19:07 UTC](https://discourse.nodered.org/t/in-which-situations-would-node-ids-change-import-or-any-other-as-well/65500/4 "2022-09-21T19:07:55Z")

</div>

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