tar pipe ssh

I always have to look this up when I need it, so storing on my blog, so I can look it up faster. This is way faster than “scp”, for deep directories or directories with lots of files.

tar cf - whatever | ssh remotehost " ( cd /some/path ; tar xf - ) "
ssh remotehost "( cd /somewhere ; tar cf - something ) " | tar xf -

Comments are closed.