4 ms·
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
by polyfractal 14y ago
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
- regularfry 14y agoThe trick is knowing when that's going to be faster than rsync.
- zemo 14y ago...or use rsync? rsync -avz somehost:/path/to/src /path/to/dest
- jackalope 14y agoFor 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.