# Backup list of installed nodes on palette

**URL:** https://discourse.nodered.org/t/backup-list-of-installed-nodes-on-palette/80469
**Category:** General
**Created:** [10 August 2023 14:01 UTC](https://discourse.nodered.org/t/backup-list-of-installed-nodes-on-palette/80469 "2023-08-10T14:01:28Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![stain3565](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/stain3565/32/68179_2.png) [@stain3565](https://discourse.nodered.org/u/stain3565)
#### Post date: [10 August 2023 14:01 UTC](https://discourse.nodered.org/t/backup-list-of-installed-nodes-on-palette/80469/1 "2023-08-10T14:01:28Z")

</div>

I have set up a process to backup my flows on restart of nodered. This is fine but, as I know to my cost, when you have multiple flows developed over years with many different interfaces, it is not so simple to just restore flows and then update the palette for unknown nodes.

Many node flow groups, created and available in palette, have conflicting named nodes. For example, "e-mail in" is created in 5 different node groups in palette. I found that, if I did not recall exactly which one I had installed before, and installed the wrong one, Node Red does not make it easy to simply remove. In fact in this case, it threw an error and would not let me simply uninstall. It took some effort to override this error and work through the node flow groups until I found the correct one. So it would be useful if, at the same time as I backed up the actual flows, I could also create a list of the installed node flow groups. Is that possible?

---

<div class="post-metadata">

### Author: ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)
#### Post date: [10 August 2023 15:41 UTC](https://discourse.nodered.org/t/backup-list-of-installed-nodes-on-palette/80469/2 "2023-08-10T15:41:46Z")

</div>

A node cannot have the same name in two different installed packages. So you should get an error when starting node-red or installing a node with a duplicate. So you should never be able to have \>1 `email-in` node.

Also, when you hover over a node in the left sidebar, it tells you what package it comes from:  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/a/1a9f57c7e07e44e1f92f61ae27f2b8727d47c5e0.png)

And finally, all node packages are defined in the `package.json` file in your userDir. You should be backing this up along with everything else. Indeed there are a number of files/folders that need to be backed up and, in general, you should always back up the whole userDir folder minus any `node_modules` folders.

---

<div class="post-metadata">

### Author: ![stain3565](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/stain3565/32/68179_2.png) [@stain3565](https://discourse.nodered.org/u/stain3565)
#### Post date: [10 August 2023 16:00 UTC](https://discourse.nodered.org/t/backup-list-of-installed-nodes-on-palette/80469/3 "2023-08-10T16:00:07Z")

</div>

I understand about conflicts. The issuewas tha if i did not know the package a node came from, i could install the wrong one when manually restoring.

However, the rest of your info will help me. I will look at backing up the folders you suggested

---

<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: [12 August 2023 12:17 UTC](https://discourse.nodered.org/t/backup-list-of-installed-nodes-on-palette/80469/4 "2023-08-12T12:17:21Z")

</div>

> [@stain3565](#):
>
> The issuewas tha if i did not know the package a node came from, i could install the wrong one when manually restoring.

There is no need to manually install the additional nodes. If you restore package.json and then go into your userDir (commonly .node-red) and run  
`npm install`  
it will install all the nodes for you. In addition, if you also restore package-lock.json then it will install the same version of those nodes as was previously installed, rather than the latest compatible version.

---

<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: [12 August 2023 12:55 UTC](https://discourse.nodered.org/t/backup-list-of-installed-nodes-on-palette/80469/5 "2023-08-12T12:55:16Z")

</div>

> [@Colin](#):
>
> There is no need to manually install the additional nodes. If you restore package.json and [...] run `npm install` it will install all the nodes for you.

So if I import a flow from [flows.nodered.org](http://flows.nodered.org) which includes a node "email-in", **npm install** will know where it comes from and correctly install it (provided that it doesn't result in a name conflict)?  
How does it know where it comes from?  
Will it at the same time update all nodes?

---

<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: [12 August 2023 13:03 UTC](https://discourse.nodered.org/t/backup-list-of-installed-nodes-on-palette/80469/6 "2023-08-12T13:03:31Z")

</div>

No, I was referring to restoring a flows file from a backup (which is the subject of this thread). The nodes required are defined in package.json, which should be backed up along with the flows file, and other stuff.

---

<div class="post-metadata">

### Author: ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)
#### Post date: [12 August 2023 13:17 UTC](https://discourse.nodered.org/t/backup-list-of-installed-nodes-on-palette/80469/7 "2023-08-12T13:17:09Z")

</div>

> [@jbudd](#):
>
> So if I import a flow from [flows.nodered.org](http://flows.nodered.org) which includes a node "email-in", **npm install** will know where it comes from and correctly install it (provided that it doesn't result in a name conflict)?

No. If a flow needs a node, you have to install it yourself. If you import a flow containing references to nodes that aren't installed, you will see those nodes with red dotted outlines and telling you that it is an unknown node.

> [@jbudd](#):
>
> How does it know where it comes from?

It doesn't.

> [@jbudd](#):
>
> Will it at the same time update all nodes?

Not sure what you mean. Importing a flow simply adds the flow JSON data (that defines the flow) to your existing flows json. That is visible in the editor. Nothing else.

---

<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: [12 August 2023 13:41 UTC](https://discourse.nodered.org/t/backup-list-of-installed-nodes-on-palette/80469/8 "2023-08-12T13:41:46Z")

</div>

> [@TotallyInformation](#):
>
> Not sure what you mean.

I was unsure if @Colin's suggestion of npm install was relevant only to restoring from backups or also uninstalled nodes in other circumstances. Clearly it's dependent on the data in package.json.

---

<div class="post-metadata">

### Author: ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)
#### Post date: [12 August 2023 14:03 UTC](https://discourse.nodered.org/t/backup-list-of-installed-nodes-on-palette/80469/9 "2023-08-12T14:03:59Z")

</div>

Yes, that is correct. `npm install` with no further package name(s) just ensures that everything in the dependencies section of the package.json file is installed according to the specified version ranges. Great for restoring backups or implementing a new instance from a template package. Or, on those odd occasions where an installed package gets messed up (maybe from using applying updates from an npm audit "recommendation" - don't do that) and you simply delete the whole `node_modules` folder and then `npm install`. Everything gets rebuilt.

---

<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: [26 August 2023 14:04 UTC](https://discourse.nodered.org/t/backup-list-of-installed-nodes-on-palette/80469/10 "2023-08-26T14:04:15Z")

</div>

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