Or you could boot up with knoppix or some other livecd so the filesystem is not in use and mount both drives and do a:
mkdir /mnt/org
mount /dev/hdx /mnt/org
mkdir /mnt/bckup
mount /dev/hdx /mnt/bckup
cp -af /mnt/org/* /mnt/bckup/.
umount both drives
then copy mbr
dd if=/dev/hdx of=/dev/hdx bs=512 count=1
I recalled this from memory but I don''t think I left anything out, but your mileage may very, at this point you could replace your orginal with your backup and it should boot just fine.
I use this method to copy/resize new virtual images and works quite good and fast.
mkdir /mnt/org
mount /dev/hdx /mnt/org
mkdir /mnt/bckup
mount /dev/hdx /mnt/bckup
cp -af /mnt/org/* /mnt/bckup/.
umount both drives
then copy mbr
dd if=/dev/hdx of=/dev/hdx bs=512 count=1
I recalled this from memory but I don''t think I left anything out, but your mileage may very, at this point you could replace your orginal with your backup and it should boot just fine.
I use this method to copy/resize new virtual images and works quite good and fast.
On Fri, Aug 1, 2008 at 2:27 PM, Matt <lm7812@xxxxxxxxx> wrote:
I have a 500GB Sata drive about 15% used I would like to make an exact
copy of too another Sata 500GB drive as a spare. That way if
something happens to the one in service I can plug in the spare
quickly and restore one of the weekly backups without reinstalling the
entire OS and all the little tweaks of setup on this mail/web server.
How do I do this? That is make an exact bootable copy of a linux
drive. Its running Centos 4.6 if that matters.
Matt
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos
_______________________________________________ CentOS mailing list CentOS@xxxxxxxxxx http://lists.centos.org/mailman/listinfo/centos