SCP File Transfer – How to Copy Files from Remote Server to Local Ignoring Existing Files

scp

I would like to copy a directory of files from a remote server to my local machine. As it is a large number of files, the option of ignoring existing files is desirable.
Unfortunately, rsync is not available for some reason (the remote server is from a CDN service, and beyond my control).

So I think I am stuck using scp -r on the folder in question.

Is there anyway of doing this while ignoring existing files?

Best Answer

SSHFS allows you to mount a remote directory accessed over SSH, more precisely over SFTP. Once you've mounted the remote directory, use rsync on what are now local files.

mkdir ~/cdn
sshfs cdn.example.com: ~/cdn
rsync -au ~/mystuff/dir/ ~/cdn/dir/
Related Question