Can I resume an interrupted disk image done with dd?

6

2

I am going to reinstall my system and I want to backup it first.

There is an 80 GB HDD with Ubuntu and 750 GB HDD on which I want to put image. So, I run a live CD and use dd to transfer my sda to an image.

But the problem is: During the process, CPU and HDD temperatures raise and the process horribly slows down. I've interrupted dd with 25 GB cloned. What should I do now?

Is there a way to resume dd? Or a way to do copy in portions? Or, maybe there is a better software than dd to clone a HDD?

user81420

Posted 2011-06-20T19:54:26.647

Reputation: 245

Well, the problem is solved. Although overheating was harmful, largest performance increase was achieved with bigger block size/bs (several megabytes). Anyway, skipping/seeking helped too. – user81420 – 2011-06-21T04:25:33.390

I get exactly the same amount of info copied. root@fe:/dev# dd\n if=/dev/sdb of=/dev/sdc\n dd: reading `/dev/sdb': Input/output error\n 48583648+0 records in\n 48583648+0 records out\n 24874827776 bytes (25 GB) copied, 5235.18 s, 4.8 MB/s\n I was thinking about using the -noerror option. Does that make sense? Thank you. – Trylks – 2013-07-13T15:56:51.257

Answers

4

I guess you could use the dd options seek and skip with the same numbers.

Another way would be to use the program 'pv' which can simply pipe data, but can also rate limit that, so then you might control your CPU/HDD temperatures.

Jaap Eldering

Posted 2011-06-20T19:54:26.647

Reputation: 7 596

So, if the command I've used was: sudo dd if=/dev/sda5 of=/media/Data1/clone.img then now I should use sudo dd if=/dev/sda5 of=/media/Data1/clone.img seek=NN skip=NN where NN is a number corresponding to 25 GB? Thank you, that makes sense. – user81420 – 2011-06-20T22:43:33.630