Remote Backup Using tar Over ssh
Steve Nospam
stevenospam2000
Tue Aug 9 06:17:09 PDT 2005
--- Kurt Wall <kwall at kurtwerks.com> wrote:
> 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
I recently needed to move all of a WinXP install to
another disk. I did a similar technique as above
except that I booted a copy of Knoppix on each machine
and then used my network.
# faucet 1234 -out tar -cvf - / on the originating
machine
on the receiving machine
# cd mnt
# umask 000
# hose 192.168.10.20 1234 -in tar --same-owner -xvpf -
thanks to John Newbigin for the technique above
I then did a recovery install of XP and bingo I had
everything just like it was on the old machine. It
was the easiest migration I've ever done.
Steve
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
More information about the Linux-users
mailing list