/ 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)
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
ssh SERVER_FOO "tar czf - DIR_FOO 2> /dev/null" | ssh SERVER_BAR "cat > /tmp/FILES_FROM_FOO-data.tgz"