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:
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.
If you were to use Projects within Node-Red and saved your settings to GitHub, the following would be stored:
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.
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
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:
- Install new Node-RED instance. I manually edit settings.js with the 3 changes I typically make.
- 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.
Start node-red in a terminal using the command
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.
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
Yes, you need to restart node-red whenever you make changes to settings file or flows file outside of node-red.