4

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?

iconoclast
  • 9,057
  • 12
  • 56
  • 95
jasonmcclurg
  • 143
  • 1
  • 4

3 Answers3

6

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/
Gilles 'SO- stop being evil'
  • 807,993
  • 194
  • 1,674
  • 2,175
0

You could login remotely to create a list of existing files, then use that locally to create a list of files that need to be transfered and build an scp command to send them over.

Caleb
  • 69,278
  • 18
  • 196
  • 226
-2

you can open the file manager like nautilus in ubuntu

and choose File->connect to Server...

insert the host address like this: sftp://hostname

insert the username and password

Nassim
  • 1