[Wylug-discuss] Delurk and how not to use rsyncApa

John Hodrien J.H.Hodrien at leeds.ac.uk
Wed Jun 22 13:24:45 UTC 2011


On Wed, 22 Jun 2011, Richard Ibbotson wrote:

> James
>
> I use scp myself over my home network...
>
> scp -r /home/james/name_of_the_folder 192.168.1.50:/home/james
> scp somefile.txt ... or ....
> scp somefile.doc
>
> the 192.168.1.50 mentioned above is the IPV4 IP address of your
> workstation or netbook.  Whichever.  Nice thing about scp is that it
> quickly copies everything over without too much CPU overhead.

But it's impractical to use as a sync tool, as it'll copy everything rather
than just the files you want.  scp also incredibly slow when you're copying a
lot of small files, as you a get a per-file latency hit.  If you're just
trying to copy a lot from one machine to another, tar over ssh is considerably
faster (and link speed and file type depending, you can throw a bzip/gzip in
there too).  scp also doesn't preserve ownership.  CPU overhead can actually
be an issue with scp, as you have to have quite a fast CPU to not find you're
CPU limited on a gigabit network (and you'll find that's a serial bottleneck,
so having lots of cores doesn't help).  Probably tar over rsh/nc would be the
fastest if you're just trying to shovel data.

rsync's the right tool for a one-way sync, it was just accidentally
misapplied, which is incredibly easy to do.  It's great when you have say
100Gbytes of photos where only a few have been added/deleted/changed.

jh



More information about the Wylug-discuss mailing list