Bash scripting rsync: rsync: link_stat (blah) failed: No such file or directory (2) Bash scripting rsync: rsync: link_stat (blah) failed: No such file or directory (2) bash bash

Bash scripting rsync: rsync: link_stat (blah) failed: No such file or directory (2)


Check that your \ characters have no whitespace after them at the end of the line. This will cause BASH to not interpret the line wrap correctly, giving the rsync error above.


Remove the '*' from the source location, rsync knows to look in the inside of the directory if you specify the '/' in the end

like that:

rsync --verbose  --progress --stats --compress --rsh=ssh --recursive --times --perms --links --delete --exclude "*bak" --exclude "*~" /repository/ $DEV_SERVER:$REMOTE_DIR


I was encountering the same error while doing some rsync work. I had the wrong character for specifying options which I must have gotten from copying and pasting the command from elsewhere:

rather than the correct character below:

-