What is the best way to clone a disk between two Macs? I ask this every couple years or so and every time I get the same answer. "Use Carbon Copy Cloner", they say. But the unfortunate fact is that CCC is a file-level copy between disks. When I migrate to my new Mac, sure all the files are there but there are quirks here and there (including file dates being different etc).
So, really now, once again: how do you clone the disk over byte-for-byte?
Best Answer
You can use the dd command to make a bit-perfect clone of a drive. It's a command line tool that ships with OS X. In order to make the clone perfect you'll need to ensure the source and the destination aren't actively in use.
To prepare for the clone I recommend creating a secondary boot disk that you can boot from. Your source for the clone should be an offline volume, not in use, when you're making the copy. Otherwise you risk copying things that are in incomplete states on disk.
With your machine booted to your secondary boot disk, log in and fire up a Terminal or iTerm window.
Run diskutil to get a list of your available drives. One of them will be your target drive you're trying to clone. The other will be your source drive. For example:
Let's say that
Macintosh HD (disk0)
is the source andClone (disk2)
is the target for ourdd
operation. Start the clone with:When
dd
finishes you may see an error like this:That last error message is actually okay. The last block written was a short block because there wasn't a full 1MB block to copy. No worries.
Now you've got a bit-wise perfect clone of your
Macintosh HD
drive. Reboot your system using theMacintosh HD
drive and enjoy your clone!