Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I just found out recently that SCP is horribly slow when transferring lots of small files. I found a blog post showing how to send compressed tarballs over SSH and it worked really well:

ssh username@from_server "tar czf - directory_to_get" | tar xzvf - -C path_to_save



...or use rsync?

   rsync -avz somehost:/path/to/src /path/to/dest


For a more accurate sync, you can also delete obsolete files on the destination:

    rsync -avz --delete src dest
This assumes there are no files you want to keep on the destination, of course. You can exclude them or reorganize to keep them safe.


The trick is knowing when that's going to be faster than rsync.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: