rsync script

I am reasonably new to Mac development, so I know just enough to be dangerous.

I want to build a script that will run on command using rsync script to backup my photography folders to my NAS. I can drag the folder names to the terminal and all works fine.

When I copy and paste into terminal to test it fails

Here is the command line and subsequent error.

ichflynn@Richs-MacBook-Pro ~ % rsync -arv --delete /Volumes/Samsung_T5/LRPhotos-T5/ /Volumes/QNAP-USB-2/LRPhotos-T5/ sending incremental file list rsync: [Receiver] mkdir "/Volumes/QNAP-USB-2/LRPhotos-T5" failed: No such file or directory (2) rsync error: error in file IO (code 11) at main.c(793) [Receiver=3.2.7] rsync: [sender] write error: Broken pipe (32) rsync error: error in file IO (code 11) at io.c(848) [sender=3.2.7] richflynn@Richs-MacBook-Pro ~ %

Suggestions?

@Richs-MacBook-Pro ~ % rsync -arv --delete /Volumes/Samsung_T5/LRPhotos-T5/ /Volumes/QNAP-USB-2/LRPhotos-T5/
sending incremental file list 
rsync: [Receiver] mkdir "/Volumes/QNAP-USB-2/LRPhotos-T5" failed: No such file or directory (2) 

Presumably /Volumes/QNAP-USB-2/ is supposed to be the NAS. (Is it actually networked, or is it a USB device as the name suggests?)

But rsync thinks it doesn’t exist. So maybe that’s not the correct name, or it’s not mounted, or something.

In any case, this usage is not exploiting rsync’s incremental protocol. For that to work, you need to actually run rsync over the network to the NAS. Example: rsync -ar /path/to/local/folder/ nas_hostname:/path/to/folder/on/nas

rsync script
 
 
Q