LWN.net Logo

A look at rsync performance

A look at rsync performance

Posted Aug 19, 2010 19:31 UTC (Thu) by pj (subscriber, #4506)
In reply to: A look at rsync performance by bronson
Parent article: A look at rsync performance

One advantage is that it's easily modified to work over ssh:

tar cf - . | ssh user@remote "cd /dest/dir; tar xf -)

or

(ssh user@remote "cd /src/dir ; tar cf - . ") | (cd /dest/dir; tar xf -)


(Log in to post comments)

A look at rsync performance

Posted Aug 20, 2010 11:53 UTC (Fri) by NAR (subscriber, #1313) [Link]

A 'cp' command can also be easily modified to work over the network, just add an 's' to the front of 'cp' :-)

A look at rsync performance

Posted Aug 20, 2010 12:28 UTC (Fri) by dsommers (subscriber, #55274) [Link]

True ... but if you have a lot of files, especially smaller files, the tar path with ssh is way faster than scp. Try copying a git repository (~2-3MB) from one site to another site. My experiences is that tar+ssh beats scp significantly.

A look at rsync performance

Posted Aug 20, 2010 14:52 UTC (Fri) by spaetz (subscriber, #32870) [Link]

> but if you have a lot of files, especially smaller files, the tar path with ssh is way faster than scp. Try copying a git repository (~2-3MB) from one site to another site. My experiences is that tar+ssh beats scp significantly.

Only because you open a new ssh connection per file by default and tar+ssh opens only one. Which causes lots of overhead. If you reuse your ssh connection scp will be fast as well:
http://www.debian-administration.org/articles/290

A look at rsync performance

Posted Aug 21, 2010 2:05 UTC (Sat) by dmag (subscriber, #17775) [Link]

No, scp can't copy symlinks.

A look at rsync performance

Posted Aug 24, 2010 20:01 UTC (Tue) by BackSeat (subscriber, #1886) [Link]

No need for all the "cd" commands:
tar -C /src/dir -cf - . | tar -C /dest/dir -xf -

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds