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

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 ?

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.

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.

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