Okay, I'e been struggling with this one for quite some time, I was unable to find a solution on this forum or on youtube or google. Please be aware I'm definitely not a programmer, I lear everything by doing, trial and error What I want to achieve: copy a file from my Pi (running node-red) to a SMB share.
So here is the background:
My Pi is running Home Assistant and Node-red. HA makes a snapshot every night in the /backup directory, the file is called " f03caf77.tar ", this changes every night, this is for later to resolve.
I want to copy this file to my NAS, I already have the NAS setup using the palette node-red-contrib-smb. This is "working" and I can read/list files from my NAS using this flow: [{"id":"59957107.51d36","type":"inject","z":"cebf0ee4.6970c","name":"start","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":150,"y":640,"wires":[["ccf04998.51c6f8"]]},{"id":"ccf04998.51c6f8","type":"SMB","z":"cebf0ee4.6970c","name":"list directory of Synology NAS","config":"95c0ac2f.4917","operation":"read-dir","path":"backups\\snapshots","path_new":"","format":"string","x":390,"y":640,"wires":[["b79fafdf.a0264"]]},{"id":"b79fafdf.a0264","type":"debug","z":"cebf0ee4.6970c","name":"debug","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":650,"y":640,"wires":[]},{"id":"95c0ac2f.4917","type":"smb config","z":"","name":"homenas","share":"\\\\192.168.1.250\\ha","domain":"WORKGROUP"}]
I can also list the local files in my Pi via this flow, it is using SMB to: [{"id":"dc6ac2fd.02c23","type":"inject","z":"cebf0ee4.6970c","name":"start","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":150,"y":580,"wires":[["466805e2.3c9b9c"]]},{"id":"466805e2.3c9b9c","type":"SMB","z":"cebf0ee4.6970c","name":"list directory of HA","config":"83329f02.d7ea2","operation":"read-dir","path":"","path_new":"","format":"string","x":350,"y":580,"wires":[["1786ee81.1a1201"]]},{"id":"1786ee81.1a1201","type":"debug","z":"cebf0ee4.6970c","name":"debug","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":650,"y":580,"wires":[]},{"id":"83329f02.d7ea2","type":"smb config","z":"","name":"homeass","share":"\\\\192.168.1.222\\backup","domain":""}]
I also can write new files to my NAS from Node-red via the SMB palette , using this flow: [{"id":"4b559e51.b608a","type":"inject","z":"cebf0ee4.6970c","name":"start","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":150,"y":700,"wires":[["f19405c4.616ad8"]]},{"id":"f19405c4.616ad8","type":"SMB","z":"cebf0ee4.6970c","name":"create TEST.txt file on Synology NAS","config":"95c0ac2f.4917","operation":"create","path":"backups\\snapshots\\TEST5.txt","path_new":"","format":"string","x":410,"y":700,"wires":[["1f7c412b.c9cc1f"]]},{"id":"1f7c412b.c9cc1f","type":"debug","z":"cebf0ee4.6970c","name":"debug","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":650,"y":700,"wires":[]},{"id":"95c0ac2f.4917","type":"smb config","z":"","name":"homenas","share":"\\\\192.168.1.250\\ha","domain":"WORKGROUP"}]
But what I cannot achieve is read the local .tar file from my Pi and save it via SMB to my NAS.
Can anyone help? I'm stuck.