Fand SCP da einfacher
[{"id":"70ef29ec.de5268","type":"backup","namespace":"backup","z":"9e0be534.bdc498","name":"","x":390,"y":110,"wires":[[{"id":"bf07c614.de038","port":0}]]},{"id":"99649ad4.083118","type":"constant","namespace":"variable","z":"9e0be534.bdc498","name":"","payload":"","payloadType":"int","outputonstartup":false,"x":250,"y":70,"wires":[[{"id":"70ef29ec.de5268","port":0}]]},{"id":"bf07c614.de038","type":"function","namespace":"function","z":"9e0be534.bdc498","name":"do scp backup","func":"$cmd = '/usr/bin/scp '. \n '-i /var/lib/homegear/<nas-user-key-file> '.\n '-o \"StrictHostKeyChecking no\" '.\n $message['payload'].' '.\n '<user>@<nas>.fritz.box:/sharedfolders/media/backup/homegear/.';\n\n$returnVar = null;\n$output = system($cmd, $returnVar);\n\n\nreturn [\n 'payload' => $output,\n 'code' => $returnVar,\n 'cmd' => $cmd\n];","inputs":1,"outputs":1,"noerr":0,"x":540,"y":110,"wires":[[{"id":"fc60c092.05ce2","port":0}]]},{"id":"5698520c.d45b54","type":"weekly-program","namespace":"timers","z":"9e0be534.bdc498","name":"everyday 22:00","startup":false,"program":[[{"time":"22:00:00","type":"bool","value":"true"}],[{"time":"22:00:00","type":"bool","value":"true"}],[{"time":"22:00:00","type":"bool","value":"true"}],[{"time":"22:00:00","type":"bool","value":"true"}],[{"time":"22:00:00","type":"bool","value":"true"}],[{"time":"22:00:00","type":"bool","value":"true"}],[{"time":"22:00:00","type":"bool","value":"true"}]],"x":230,"y":110,"wires":[[{"id":"70ef29ec.de5268","port":0}]]},{"id":"fc60c092.05ce2","type":"switch","namespace":"basic-logic","z":"9e0be534.bdc498","name":"","property":"code","changes-only":false,"output-true":false,"output-false":false,"rules":[{"t":"eq","v":"0","vt":"int"}],"checkall":"true","inputs":1,"outputs":1,"x":260,"y":220,"wires":[[{"id":"fded0273.9492d8","port":0}]]},{"id":"e59b15c8.2616c8","type":"mqtt-out","namespace":"mqtt","z":"9e0be534.bdc498","name":"","topic":"s11/system/last-successful-backup","retain":"true","broker":"66bdeb72.8e0e0c","x":655,"y":220,"wires":[]},{"id":"fded0273.9492d8","type":"function","namespace":"function","z":"9e0be534.bdc498","name":"","func":"$message['payload'] = date('Y-m-d H:i:s');\nreturn $message;","inputs":1,"outputs":1,"noerr":0,"x":420,"y":220,"wires":[[{"id":"e59b15c8.2616c8","port":0}]]},{"id":"66bdeb72.8e0e0c","type":"mqtt-broker","namespace":"mqtt","z":"","broker":"ha.fritz.box","port":"1883","clientid":"","usetls":false}]