LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   `dd` to copy a HD to another one? (https://www.linuxquestions.org/questions/linux-newbie-8/%60dd%60-to-copy-a-hd-to-another-one-303898/)

MHOOO 03-20-2005 10:10 AM

`dd` to copy a HD to another one?
 
Well, it's fairly simple... I've got a ~80GB HD on which Linux is installed and I wan't to backup the whole thing to a ~200GB HD, since I intend to repartition the ~80GB HD.
So, is this possible with the `dd if=/dev/hde of=/dev/hdf` command (not just copying partitions, but instead - the whole Drive - including partition-tables!).
I tried already `cp -afv` to copy all the files, but after I compared the two Drives there were _way_ to many files that differed (in the content), so this is somehow my last resort.
I'm currently trying it out, but copying ~80GB of Data will take some time.

Maybe someone has some experience with this?
Can I boot Linux on the 200GB Drive (after changing /etc/fstab) - or do I have to do something else (I'm not really sure whether I don't have to change something with the partition-tables)?

I'm running RedHat 9.0 and `dd`-ing through the recovery disk - but I'm not really sure whether it's important in this matter.
Checked the ~200GB HD around 4 times for bad blocks -> didn't find anything.

Thanks & bye bye~,
MHOOO

david_ross 03-20-2005 11:01 AM

It should work fine. You shouldn't need to change fstab unless you don't change the drive physical positions.

You will need to do it from the recovery cd to prevent files being changed during the copy.

You may also want to take a look at partimage.

MHOOO 03-20-2005 07:06 PM

Yeah~!
It actually really did work x!D
I read that the HDs should be identical if you want to use the `dd` Command to copy all the Data, but it worked just fine. It probably doesn't matter, as long as the HD you are copying to has more space than the one you are copying from.
Backing up a whole drive with just one easy Command... - it's way more effective than first partitioning and then using `cp -av /root /boot [...] /my-new-hd`... at least it seems to me x!D

Thanks & bye bye~,
MHOOO


All times are GMT -5. The time now is 07:12 PM.