Re: SSH scripting

From: Nico Kadel-Garcia (nkadel_at_comcast.net)
Date: 04/01/04


Date: Thu, 1 Apr 2004 01:03:24 -0500

ash wrote:
> my fav way of doing it:
>
> ssh -e none username@host "tar zcvf - /home/me" | tar zxvf -
>
> This is especially useful if you want to mirror a hard disk over the
> n/w. most linux distros come with sshd installed...
>
> ~a

Use "rsyne -e ssh -avH" where possible: rsync has some nice options to
delete extraneous files at the remote location, and has some nice checksum
utilities that tar doesn't. You can also set up an rsync service on the
remote server if you want to rely on host-based access rather than SSH for
something that lives in a specific subdirectory: tar really doesn't have
that kind of control of the remote insallation directory unless you start
setting up chroot cages.