# node-RED Backup Flow

**URL:** https://discourse.nodered.org/t/node-red-backup-flow/25033
**Category:** Share Your Projects
**Created:** [17 April 2020 20:52 UTC](https://discourse.nodered.org/t/node-red-backup-flow/25033 "2020-04-17T20:52:55Z")
**Posts on this page:** 17
**Page:** 2

<div class="post-metadata">

### Author: ![Paul-Reed](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/paul-reed/32/66906_2.png) [@Paul-Reed](https://discourse.nodered.org/u/Paul-Reed)
#### Post date: [20 October 2020 14:16 UTC](https://discourse.nodered.org/t/node-red-backup-flow/25033/21 "2020-10-20T14:16:18Z")

</div>

Since node-RED v1.2.0, the `config.json` file has been split up into seperate files, so to capture those files for the backup, please change this line in the `node-red-contrib-dsm` node;

`"cmd += pre + '.config.json';",`

to

`"cmd += pre + '.config*.json';",`

...which includes the wildcard character \* to ensure that all of the conf files are included.

---

<div class="post-metadata">

### Author: ![Paul-Reed](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/paul-reed/32/66906_2.png) [@Paul-Reed](https://discourse.nodered.org/u/Paul-Reed)
#### Post date: [17 April 2021 21:09 UTC](https://discourse.nodered.org/t/node-red-backup-flow/25033/22 "2021-04-17T21:09:37Z")

</div>

Flow updated (see [post #1](https://discourse.nodered.org/t/node-red-backup-flow/25033) above) to include the additional `package.json` & `package-lock.json'`contained within the `externalModules` folder, which **was introduced in v1.3.0**.

The changes in the DSM node are the inclusion of;

```auto
"cmd += pre + 'externalModules/package.json';",
"cmd += pre + 'externalModules/package-lock.json';",
```

---

<div class="post-metadata">

### Author: ![Paul-Reed](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/paul-reed/32/66906_2.png) [@Paul-Reed](https://discourse.nodered.org/u/Paul-Reed)
#### Post date: [21 July 2021 09:15 UTC](https://discourse.nodered.org/t/node-red-backup-flow/25033/23 "2021-07-21T09:15:50Z")

</div>

Flow updated (see [post #1](https://discourse.nodered.org/t/node-red-backup-flow/25033) above) to accommodate changes made in node-RED v2.0.0.  
The `package.json` & `package-lock.json'` contained within the `externalModules` folder, which was introduced in node-RED v1.3.0 has now been discontinued, and a `.config.modules.json` file added to manage the external modules instead.

The changes in the DSM node therefore are the removal of lines;

~~"cmd += pre + 'externalModules/package.json';",  
"cmd += pre + 'externalModules/package-lock.json';",~~

and the addition of;

```auto
"cmd += pre + '.config.modules.json';",

```

---

<div class="post-metadata">

### Author: ![krambriw](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/krambriw/32/5429_2.png) [@krambriw](https://discourse.nodered.org/u/krambriw)
#### Post date: [21 July 2021 18:10 UTC](https://discourse.nodered.org/t/node-red-backup-flow/25033/24 "2021-07-21T18:10:41Z")

</div>

Paul, I'm using projects, are you covering all files required also in this case?

---

<div class="post-metadata">

### Author: ![Paul-Reed](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/paul-reed/32/66906_2.png) [@Paul-Reed](https://discourse.nodered.org/u/Paul-Reed)
#### Post date: [21 July 2021 20:52 UTC](https://discourse.nodered.org/t/node-red-backup-flow/25033/25 "2021-07-21T20:52:37Z")

</div>

> [@krambriw](#):
>
> I'm using projects, are you covering all files required

Hi Walter, I haven't added projects, but it shouldn't be too difficult to add.  
I don't use `projects`, but I'm assuming that the default node-RED structure would be;

```auto
.node-red
         |__ projects
                     |__ my_first_project
                     |__ my_second_project

```

...and the projects subfolders will include the respective project's flow files, etc.

Is that correct?

If so, you would need to add this at line 52 in the `dsm` node

```auto
"cmd += pre + 'projects/*';",

```

so it looks like this

![projects](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/c/3ca3898325fead8579ad85f327b7460502898ab4.jpeg)

Adding that line will add all sub-folders & files within the projects folder to the zip backup file.

Hope that helps!

---

<div class="post-metadata">

### Author: ![krambriw](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/krambriw/32/5429_2.png) [@krambriw](https://discourse.nodered.org/u/krambriw)
#### Post date: [22 July 2021 08:40 UTC](https://discourse.nodered.org/t/node-red-backup-flow/25033/26 "2021-07-22T08:40:10Z")

</div>

Excellent, thank you!!

---

<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: [22 July 2021 14:03 UTC](https://discourse.nodered.org/t/node-red-backup-flow/25033/27 "2021-07-22T14:03:55Z")

</div>

> [@krambriw](#):
>
> I'm using projects, are you covering all files required also in this case

If you are using projects then you can link the project to, for example, a github repository so you won't need to back it up to usb.

---

<div class="post-metadata">

### Author: ![craigcurtin](https://avatars.discourse-cdn.com/v4/letter/c/94ad74/32.png) [@craigcurtin](https://discourse.nodered.org/u/craigcurtin)
#### Post date: [27 July 2021 02:38 UTC](https://discourse.nodered.org/t/node-red-backup-flow/25033/28 "2021-07-27T02:38:04Z")

</div>

I think it would be worth having this as an FAQ/Sticky for all the newbies.

There has to be at least one a month on here asking about corrupted flows, SD cards etc etc

Craig

---

<div class="post-metadata">

### Author: ![FSHelgeland](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/fshelgeland/32/64260_2.png) [@FSHelgeland](https://discourse.nodered.org/u/FSHelgeland)
#### Post date: [23 December 2021 18:57 UTC](https://discourse.nodered.org/t/node-red-backup-flow/25033/29 "2021-12-23T18:57:50Z")

</div>

This was very helpful. Thank you so much for this one.

---

<div class="post-metadata">

### Author: ![FSHelgeland](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/fshelgeland/32/64260_2.png) [@FSHelgeland](https://discourse.nodered.org/u/FSHelgeland)
#### Post date: [10 July 2022 22:37 UTC](https://discourse.nodered.org/t/node-red-backup-flow/25033/30 "2022-07-10T22:37:30Z")

</div>

This one just saved me, but I had not saved my dropbox access token, and now dropbox only pass out short lived tokens. Is there a solution to this?

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [10 July 2022 22:55 UTC](https://discourse.nodered.org/t/node-red-backup-flow/25033/31 "2022-07-10T22:55:12Z")

</div>

> [@FSHelgeland](#):
>
> Is there a solution to this

Use projects mode and sync to a github repo - never lose a thing.

---

<div class="post-metadata">

### Author: ![craigcurtin](https://avatars.discourse-cdn.com/v4/letter/c/94ad74/32.png) [@craigcurtin](https://discourse.nodered.org/u/craigcurtin)
#### Post date: [10 July 2022 23:05 UTC](https://discourse.nodered.org/t/node-red-backup-flow/25033/32 "2022-07-10T23:05:49Z")

</div>

Except then Microsoft have full access to all your code to include in their new AI system - which may or may not concern someone

Craig

---

<div class="post-metadata">

### Author: ![krambriw](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/krambriw/32/5429_2.png) [@krambriw](https://discourse.nodered.org/u/krambriw)
#### Post date: [11 July 2022 06:35 UTC](https://discourse.nodered.org/t/node-red-backup-flow/25033/33 "2022-07-11T06:35:37Z")

</div>

Craig, so as precaution I assume you still use this model?

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/7/c740ad6da9845ba50ee87f42232a37d653c028c7.png)

---

<div class="post-metadata">

### Author: ![DiverRich](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/diverrich/32/64523_2.png) [@DiverRich](https://discourse.nodered.org/u/DiverRich)
#### Post date: [11 July 2022 06:49 UTC](https://discourse.nodered.org/t/node-red-backup-flow/25033/34 "2022-07-11T06:49:24Z")

</div>

I have the same issue. Pretty much everyday I have to go get a new token and then do my "automatic" backup. 🙂

---

<div class="post-metadata">

### Author: ![Paul-Reed](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/paul-reed/32/66906_2.png) [@Paul-Reed](https://discourse.nodered.org/u/Paul-Reed)
#### Post date: [11 July 2022 08:37 UTC](https://discourse.nodered.org/t/node-red-backup-flow/25033/35 "2022-07-11T08:37:34Z")

</div>

The flow uses the '[dropbox](https://flows.nodered.org/node/node-red-node-dropbox)' node to update the backup to Dropbox, so I would suggest raising the issue with the [node maintainers](https://github.com/node-red/node-red-web-nodes/issues), who may be able to fix, advise or update their node's readme to overcome the problem.

To clarify, the problem is not with this flow, it's because the Dropbox node has not been updated since dropbox's API auth was changed.

---

<div class="post-metadata">

### Author: ![Paul-Reed](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/paul-reed/32/66906_2.png) [@Paul-Reed](https://discourse.nodered.org/u/Paul-Reed)
#### Post date: [12 July 2022 15:23 UTC](https://discourse.nodered.org/t/node-red-backup-flow/25033/36 "2022-07-12T15:23:09Z")

</div>

18 posts were merged into an existing topic: [Node-red-node-dropbox token expiration](https://discourse.nodered.org/t/node-red-node-dropbox-token-expiration/65008/2)

---

<div class="post-metadata">

### Author: ![Paul-Reed](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/paul-reed/32/66906_2.png) [@Paul-Reed](https://discourse.nodered.org/u/Paul-Reed)
#### Post date: [12 July 2022 15:26 UTC](https://discourse.nodered.org/t/node-red-backup-flow/25033/46 "2022-07-12T15:26:12Z")

</div>

Discussion about problems with `node-red-node-dropbox` moved to...

> [@Node-red-node-dropbox token expiration](https://discourse.nodered.org/t/node-red-node-dropbox-token-expiration/65008):
>
> Since the Dropbox API was changed about a year ago, users have found that they need to continually apply for new tokens for the node Auth to work. This topic is to discuss the issue, and try and find a resolution to restore functionality.

[Previous page](https://discourse.nodered.org/t/node-red-backup-flow/25033.md?page=1)
