On Wed, Sep 26, 2007 at 03:22:02PM -0400, Von Landfried wrote:
I copied this from http://happygiraffe.net/copy-net which is a nice
tar -cf - /some/file | ssh host.name tar -xf - -C /some/place/cool
Do not use "/some/file" - Although GNUtar (the version on CentOS) will strip off the leading / on extraction, it's a bad habit to get into and _will_ bite you in the foot if you ever use a different version of tar.
Also, depending, a "p" flag on extraction might be useful.
Personally I also "cd" rather than -C on extraction. So
cd /source/directory tar cf - . | ssh RemoteHost "cd /dest/directory && tar xfp - "