Ghosting with Linux

Garrett Goebel garrett at scriptpro.com
Wed Aug 20 18:27:30 CDT 2003


Jason Clinton wrote:
>
> Our network administrator has been trying to Ghost
> our Windows 2k box for a week to no avail. I'm
> getting impatient and would like to move on with
> our lives. I am thinking that something like this
> from a Linux on CD distro should do the trick:
>
> # dd bs=1024 if=/dev/hda1 > ssh -2C -l [user] [ip
> of a linux box with 10GB free] "tar -cj
> /var/server-backup.tar.bz2"
>
> Does anyone think this won't work?

Probably, but why tar one file? and why send so much data across the wire
before compressing it?

I've been meaning to get around to doing this at home... A little testing
without actually doing an entire partition indicates the following would
probably work pretty well:

backup:
dd if=/dev/hda1 | bzip2 -9c | ssh [user at addr] ">" [remote_file]

restore:
ssh [user at addr] bzip2 -dc [remote_file] | dd of=/dev/hda1

> Any performance enhancing options I should consider?

play around with:
dd bs=128k|256k|512k|1M|10M
bzip2 -1..9

variants etc. and compare results...

If you don't have issues which would prevent it... you might consider also
to zero out the parition before compressing it:

dd if=/dev/zero of=/zero && rm /zero

> Is there a way to monitor the progress of the operation
> as it's occurring?

ssh [user at addr] ls -l [remote_file]

> Empty blocks will be copied too, right?

Yes.

--
Garrett Goebel
IS Development Specialist
ScriptPro                  Direct: 913.403.5261
5828 Reeds Road            Main:   913.384.1008
Mission, KS 66202          Fax:    913.384.2180
www.scriptpro.com          garrett at scriptpro dot com





More information about the Kclug mailing list