Portal Home > Knowledgebase > Articles Database > How to copy entire hdd to new hdd in same system ?


How to copy entire hdd to new hdd in same system ?




Posted by AndyJ, 11-28-2007, 07:10 PM
Hi guys, I have a system that need to be formated, before i do that i want to backup everything (etc,bin,tmp...) to new hard drive (external hard drive) which connected to system by firewire. Is there any command that i can copy entire the hdd to new hdd ? I used to use this "cp -R folder folder " but it takes too long. Any suggestion ? Thanks. note: i am currently using Unix.

Posted by blessen, 11-28-2007, 07:35 PM
Check this link http://terrencemiao.com/Webmail/msg00729.html

Posted by Jakiao, 11-29-2007, 08:05 AM
Copying the drive is going to take some patience. One simple method would be to just mirror the drive: Say the old drive is on /dev/sda and the external drive is on /dev/sdc. You could run: dd if=/dev/sda of=/dev/sdc That would copy every single byte exactly as it appears on the old drive to the new leaving you with a bootable drive. Just be sure to verify that it worked well after making the mirror. Please note that this will copy every single byte, used or unused, from the old drive. All unused space will be copied as it is to the new drive as well (e.g. garbage data or zeros). So if this is a large drive, it may take awhile.

Posted by david510, 11-29-2007, 08:24 AM
If the old drive is 20 gb and the new drive is 40 gb, will not this kind of mirroring use the whole 40 gb? Or 20 gb will be still free in the new drive?

Posted by Adam-AEC, 11-29-2007, 10:01 AM
Generally I use a copy of the GParted live cd to mirror drives. It's as simple as right click the partition / copy and then right click / paste on the new drive/unpartitioned space. You will have to fix Grub/LILO after you make the copy, but not difficult to do. GParted is here: http://gparted.sourceforge.net/ Edit: Looks like your situation might be better of with the use of rsync, since I believe you are actually just want to back up files, not partition structure.



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
SPF record help! (Views: 483)