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
Matt 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. >brute force approach... dd if=/dev/sda of=/dev/sdb bs=16384 that will copy the whole physical drive. I would do this in single user mode (init 1) for best results, as any changes to the file system while a copy is in progress will be inconsistent
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. On Fri, Aug 1, 2008 at 2:27 PM, Matt <lm7812 at gmail.com> 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 at centos.org > http://lists.centos.org/mailman/listinfo/centos >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.centos.org/pipermail/centos/attachments/20080801/30c5cf00/attachment.html>
Matt 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. >stupid question ... why not just put it in the machine and make it a raid1 mirror then, if the first one dies, you just use the second one :D -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 251 bytes Desc: OpenPGP digital signature URL: <http://lists.centos.org/pipermail/centos/attachments/20080802/1f9af997/attachment.sig>
>> 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. >> > > stupid question ... why not just put it in the machine and make it a raid1 > mirror > > then, if the first one dies, you just use the second one :DHow do you do that? Matt
On Sat, Aug 2, 2008 at 4:00 PM, Johnny Hughes <johnny at centos.org> wrote:> stupid question ... why not just put it in the machine and make it a raid1 > mirrorcuz it's not an md volume to begin with?
> 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/.Won't this command choke if there are too many files? I think I have run into that before. Matt> umount both drives > > then copy mbr > > dd if=/dev/hdx of=/dev/hdx bs=512 count=1
>> 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. >> > > > brute force approach... > > dd if=/dev/sda of=/dev/sdb bs=16384 > > that will copy the whole physical drive. I would do this in single user > mode (init 1) for best results, as any changes to the file system while a > copy is in progress will be inconsistentCan I use this to copy from a single 500GB SATA drive with only 54GB in use to a hardware RAID 1 drive of 300GB? The RAID will be two 300GB SATA drives. Matt