Remote Backup Using tar Over ssh
Ken Moffat
kmoffat
Sun Aug 7 18:24:53 PDT 2005
Kurt Wall wrote:
>Hello, list,
>
>I needed to move a directory tree from one machine to another on my
>local network. Interested in doing so in as few steps as possible,
>I found a tar over ssh invocation worked quite handily:
>
>tar cf - /old_web | ssh root at luther tar xf - /var/www/htdocs/old
>
>This creates a tar archive of /old_web, sending the created
>output to stdout. The output is piped to the stdin of a tar
>command invoked over ssh, which deposits the output into
>/var/www/htdocs/old on the destination machine (luther).
>
>I'm sure there are more elegant ways to do this, but IWFM.
>
>As always, YMMV and if it breaks, you get to keep both pieces.
>
>Kurt
>
>
Clever.
Question. Would
rsync -e ssh -avz /old_web luther:/var/www/htdocs/old/
be basically the same?
--
ken
More information about the Linux-users
mailing list