On Sep 11, 2:10pm, Ravi Parimi wrote:
> I dont think ssh -r will copy sub-directories etc...
No, but "scp -r" will. That said, there may still be reasons to prefer
tar (with ssh) over scp. (E.g, tar may do a better job at preserving
certain file attributes than scp -rp.)
> tar cvf - dir/ | ssh user@other.server.com "cat > dir.tar" does a great
> job of replicating the directory structure completely onto the remote
> machine...
That just creates a tar file on the remote machine. If you want to
untar it too, you need to do something like:
tar cf - dir | ssh user@other.server.com "tar -C /path/to/remote/dir xf -"
Kevin