Quote:
Originally Posted by dangral
I'm running FC3 and I'd like to copy the entire /dev/hda to /dev/hdc, including all the boot info, so that I can boot off of it in case of failure. This will be a one time thing. I'm doing an app upgrade and I'm very afraid the install will go wrong, so I want to be able to quickly be back up in case of failure.
Any ideas?
Both are 10GB drives, but from different manufacturers. I doubt that makes a difference, but I wanted to include that info.
Quote:
Originally Posted by Sergiu-IT
Hi !
I don't think is necesarely to copy the entire disk/partition... a backup will be enough, but if you insist try to do it with dd (man dd). In Linux it should be something like this:
dd if=/dev/hda of=/dev/hdc
I've never done this before, but it should work.
I agree with Sergiu-IT, you don't have to clone the entire disk. You can just copy important system files in / /usr or /home by using the tar command. I think you can use "tar cvzf /dev/hdc /usr /boot / /home"; and if your original system fails after an application update, you can just restore these directories back to your /dev/hda.
dd if=/dev/hda of=/dev/hdc should work, but you will have to edit the fstab file in /etc/fstab in order to boot from /dev/hdc properly, Since dd will "clone" the disk content in /dev/hda with fstab using /dev/hda's configuration. Unless of course, you physically reconfigure the drives by changing the cables to make "/dev/hdc" become "/dev/hda". I had this similar problem once with my Red Hat Linux 9.
Important: Make sure your target disk (/dev/hdc) is at least with capacity equal or greater than your /dev/hda, or it'll generate an error on /dev/hdc.