How best to copy the entire contents of one partition to another?

Darrin Chandler dwchandler at stilyagin.com
Sun Jan 8 09:46:06 MST 2006


Eric "Shubes" wrote:

>> dd will copy the full partition, block by block, rather than
>> copying individual files.  It's almost always more appropriate to do
>> "cp -a", unless fsck detects significant filesystem structure damage.
>
>
> Why is that so? (please expound a bit)


The short answer is that dd operates at a lower level than cp. If you 
thoroughly understand what you want to do, and how to tell dd to do it, 
then you're okay using dd. Unless dd can't easily do what you want. 
Using cp, you're going to be okay. It'll easily handle the differences 
between filesystems, or whatever. So I certainly use cp unless cp can't 
handle the job (like copying things that aren't files, like the MBR). 
It's just plain easier and less error-prone to use cp.

-- 
Darrin Chandler
dwchandler at stilyagin.com
http://www.stilyagin.com/



More information about the PLUG-discuss mailing list