How to force rsync to create destination folder
Need to force it to create folders
I ran into same issue today and found the solution here.
You can either do:
rsync -avR foo/bar/baz.c remote:/tmp/
rsync -avR somedir/./foo/bar/baz.c remote:/tmp/
to create /tmp/foo/bar/baz.c in the remote machine.
see --relative/-R section of man rsync for more details.