# How to copy my Flows - From Pi to win10?

**URL:** <https://discourse.nodered.org/t/how-to-copy-my-flows-from-pi-to-win10/20195>\
**Category:** General\
**Created:** [11 January 2020 16:05 UTC](https://discourse.nodered.org/t/how-to-copy-my-flows-from-pi-to-win10/20195 "2020-01-11T16:05:43Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![lost66](https://avatars.discourse-cdn.com/v4/letter/l/7993a0/32.png) [@lost66](https://discourse.nodered.org/u/lost66)\
**Post date:** [11 January 2020 16:05 UTC](https://discourse.nodered.org/t/how-to-copy-my-flows-from-pi-to-win10/20195/1 "2020-01-11T16:05:43Z")

</div>

hi guys,

so i made quite an complex flow on my pi some time ago, but since then something  
went wrong with the pi / usb stick.

i want to continue with the flow so i decided to install nr on my laptop,  
i also managed to recover some of the files from the stick, i also have an export on clipboard  
but i dont remember how new it is and it dose not contain all the user data.  
its time to use the old files.

from the usb:

.config.json  
.config.json.backup  
.flows\_raspberrypi.json.backup  
.flows\_raspberrypi\_cred.json.backup  
flows\_raspberrypi.json  
flows\_raspberrypi\_cred.json  
package.json  
package-lock.json  
settings.js

so the question would be, which files do i copy over,  
do i have to rename 'raspberrypi' to the pc name,  
and is there something that needs to be changed in some of the files?

one more thing, is there a way that i can emulate the gpio pins for testing.

thanx

---

<div class="post-metadata">

**Author:** ![jodelkoenig](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jodelkoenig/32/44645_2.png) [@jodelkoenig](https://discourse.nodered.org/u/jodelkoenig)\
**Post date:** [12 January 2020 07:50 UTC](https://discourse.nodered.org/t/how-to-copy-my-flows-from-pi-to-win10/20195/2 "2020-01-12T07:50:25Z")

</div>

If you were to use Projects within Node-Red and saved your settings to GitHub, the following would be stored:

- flows\_YOUR\_HOST\_NAME.json
- flows\_YOUR\_HOST\_NAME\_cred.json
- package.json

If you applied those files to a new instance, you would be asked to re-install the packages you have been using so far. They are listed in package.json.

Aside settings.js might be good to look at. To get the instance itself back to the state you had with your raspberry.

Cheers

---

<div class="post-metadata">

**Author:** ![lost66](https://avatars.discourse-cdn.com/v4/letter/l/7993a0/32.png) [@lost66](https://discourse.nodered.org/u/lost66)\
**Post date:** [12 January 2020 08:16 UTC](https://discourse.nodered.org/t/how-to-copy-my-flows-from-pi-to-win10/20195/3 "2020-01-12T08:16:51Z")

</div>

> [@jodelkoenig](#):
>
> If you were to use Projects within Node-Red

thanx for the reply, but unfortunately i did not now this at the time, now i am stuck with just the files that i managed to get of the usb.  
i have tried deleting all the files on pc and replaced them with the ones on the usb, but that did not work.  
i also renamed them to the pc name, same result.  
it always just brings up the first flow that i imported from clipboard with no credentials

---

<div class="post-metadata">

**Author:** ![jodelkoenig](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jodelkoenig/32/44645_2.png) [@jodelkoenig](https://discourse.nodered.org/u/jodelkoenig)\
**Post date:** [12 January 2020 08:25 UTC](https://discourse.nodered.org/t/how-to-copy-my-flows-from-pi-to-win10/20195/4 "2020-01-12T08:25:16Z")

</div>

My reference to Projects was meant to indicate what Node-RED "officially" saves. Hence, the files that really matter are the ones I listed above. I tested it many times. My approach:

1. Install new Node-RED instance. I manually edit settings.js with the 3 changes I typically make.
2. transfer above mentioned files to the new maschine. If you do not work with projects, it should be sufficient to just copy the three files to the roo-data-dir of your instance

If I am not totally wrong I once even started with a fresh install, enabled Projects in settings.js, created a new project and then just copied my local files to the corresponding project folder. F.e. ../projects/NAME\_OF\_PROJECT.

After that all my flows were available again. None of them working, of course, since all add-ons had to be re-installed. However, this process is supported by system messages of Node-Red.

---

<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 January 2020 08:43 UTC](https://discourse.nodered.org/t/how-to-copy-my-flows-from-pi-to-win10/20195/5 "2020-01-12T08:43:45Z")

</div>

Start node-red in a terminal using the command  
`node-red-start`  
In the startup log it will tell you which flows file it is using. Replace that file with the one from the old system and restart node red.

---

<div class="post-metadata">

**Author:** ![lost66](https://avatars.discourse-cdn.com/v4/letter/l/7993a0/32.png) [@lost66](https://discourse.nodered.org/u/lost66)\
**Post date:** [12 January 2020 09:18 UTC](https://discourse.nodered.org/t/how-to-copy-my-flows-from-pi-to-win10/20195/6 "2020-01-12T09:18:27Z")

</div>

thank you jodelkoenig and Colin for your help.  
i still had all the files copied from the usb, in the folder and renamed to the pc.  
(as i have done before, and that never worked)  
i decided to close the terminal and to open it up again to see the startup log.  
and there it is... all the way i left it way back then.  
although i probably did not need all 9 files,  
the key is to close the terminal and restart node-red from terminal  
(not just open and closing or deploying from the browser)  
thank you again  
👏

---

<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 January 2020 09:27 UTC](https://discourse.nodered.org/t/how-to-copy-my-flows-from-pi-to-win10/20195/7 "2020-01-12T09:27:51Z")

</div>

Yes, you need to restart node-red whenever you make changes to settings file or flows file outside of node-red.
