We’ve all used DD before:
dd if=/dev/sda of=/dev/sdb
But someone pointed out there was a better way – a way that would allow retrieval of data even if the drive was dying. DD was never supposed to be able to do that, so it’s generally not the best tool to use.
apt-get install gddrescue
ddrescue -v /dev/sda /dev/sdb
That’s it.
Oh, I learned about ddrescue from Dimitar Darazhanski’s blog.