Posted By

4fthawaiian on 07/25/11


tar ssh

Versions (?)

relay files via tar+ssh+cat

 / Published in: Bash

rsync doesn't like to copy files from host to host. This is sort of the "old school" unix way - tar everything to a pipe, then pipe everything out. It's how we used to copy directories remotely before we had tools like rsync. I'm definitely open to suggestions on how to improve this (even a fix for rsync, if I'm wrong)

  1. ssh SERVER_FOO "tar czf - DIR_FOO 2> /dev/null" | ssh SERVER_BAR "cat > /tmp/FILES_FROM_FOO-data.tgz"

Report this snippet  

You need to login to post a comment.