[ale] backup a running RH7.2 box

Michael Hirsch mdhirsch at gmail.com
Wed Sep 14 12:40:02 EDT 2005


On 9/13/05, Sid Lane <jakes.dad at gmail.com> wrote:
> 
> all,
> 
> for reasons I do not which to discuss I have a semi-pressing need to make 
> as close a backup as possible of a running RH7.2 box. I can shutdown as 
> many services as needed but am somewhat afraid of rebooting (especially 
> spinning down the drives since we have had fairly high failure rate with 
> that model).
> 
> I have tried the following without success:
> 
> 1. install an identical drive in another server
> 2. fdisk to identical partitions as server to be cloned (S2BC)
> 3. format filesystems with same type as S2BC
> 4. shutdown as many services as possible on S2BC
> 5. tar / on S2BC (tar cvzpf cloneme.tgz /)
> 6. scp tarball to surrogate server
> 7. untar tarball


After this you have an identical filesystem on the new drive, but only at a 
logical level. At the level of bits on sectors, the layout will be 
completely different. Lilo works by writing the exact sectors that the 
kernel is stored in to your MBR. So step 8 below won't really help.

8. dd MBR from S2BC to surrogate drive
> 9. install clone drive to identical chasis as S2BC


Now boot from a rescue CD or floppy. What I usually do to make things easy 
is mount the root filesystem of the HD on /mnt, then mount any other 
partitions where they should go relative to /mnt (so /boot goes in 
/mnt/boot, etc.) If you have a /boot partition it is particularly critical 
to mount it. /home probably doesn't matter.

cd to /mnt
chroot /mnt -- this makes your system as close as possible to the way it 
would have been if it had booted from the HD
now rerun lilo: lilo -v

Reboot and eject you rescue CD. Lilo should work.

There are ways to do this without the reboot onto a CD trick, but they are 
hard to describe and harder to remember. The lilo documentation discusses 
them. Look for remapping drives.

If you use grub instead of lilo, this gets a little easier, too. But this 
should work okay with lilo.

Hope that helps,

Michael
-------------- next part --------------
An HTML attachment was scrubbed...




More information about the Ale mailing list