Tuesday, April 10, 2012

Back-up broken HDD partition to image file using linux dd

After four years of service (as I remember), my external hd drive finally about to meet its end. I'm hearing squeaking and clicking noise from it. Then I think before it getting worse, I need to backup the data to another media. A long time ago, I already heard about the tool : "dd" - that is able to backup even a broken hard drive. So, I decided to give it a try.

The command is simple. I just use
 dd if=/dev/sdc1 of=/home/myname/imagefile conv=noerror,sync
/dev/sdc1 is the partition that I wanted to backup, and after the of= argument, I put the target image file. The noerror option simply made the reading process going even if an error is found, and the sync option.... I'm not sure about it :p. I use it because the tutorials on the web also use it.