Backup NodeRed without WebGUI

Hi guys.
I had a pretty stable NodeRed running with a Mosquito on my Raps, but today I wanted to install some additional services for 3d Printing.
Stupid as I were I didn't do any kind of backup, so now I have a fcked NodeRed and my new Applications also don't work.
So that's why I wanna do a new clean Installation.
But for the Moment I need to backup my Flows, is there a way to do so with ssh or maybe ftp?
Nodered can't start the webGUI

Started Node-RED graphical event wiring tool.
    if (sendEvent?.destination?.node) {
SyntaxError: Unexpected token '.'
    at wrapSafe (internal/modules/cjs/loader.js:915:16)
    at Module._compile (internal/modules/cjs/loader.js:963:27)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Module.require (internal/modules/cjs/loader.js:887:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.<anonymous> (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/flows/index.js:19:12)
    at Module._compile (internal/modules/cjs/loader.js:999:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
nodered.service: Main process exited, code=exited, status=1/FAILURE
nodered.service: Failed with result 'exit-code'.
nodered.service: Service RestartSec=100ms expired, scheduling restart.
nodered.service: Scheduled restart job, restart counter is at 273.
Stopped Node-RED graphical event wiring tool.

Thanks for your advice

You might be able to start Node-red in safe mode node-red --safe

You might be able to repair Node-red by running the installation script again.

bash <(curl -sL

Failing that your flows are in a couple of files specified in ~/.node-red/settings.js. Look for a line like this

flowFile: 'flows.json',

( ie flows are in ~/.node-red/flows.json, and encrypted credentials in ~/.node-red/flows_cred.json)

You can do a simple backup of the entire ~/.node-red directory using command line tools such as
tar cvf noderedbackup.tar .node-red
To restore from this backup:
Install Node-red using the script.
Put the backup file in your home directory.
tar xvf noderedbackup.tar

Either backup method will save your flows but any additional nodes you have installed will have to be reinstalled on the new machine.

Your problem is you have installed a node or added some code that is using more modern syntax than the version of node JS on your raspberry pi.

If you run the official raspberry pi installer script with --node18 everything should be upgraded and start working.

Thanks a lot guys.
I tried the updater already, it doesn't changed.
but the scripts were wrote years ago and only are really low level commands.
just some if this than that stuff.
so I guess backupping the flow files on my pc, getting a new sd, installing nodered and retransferring the data is my goto

I totally missed the conclusion:
I copied the files, updated all nodes to new version and needed to re-setup the HomeKit configuration node.
Now everything works again.

Thanks a lot

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