Cloning a hard drive is making an exact replica of the existing hard drive on another storage device connected externally to the system. The clone acts as a data backup or alternative source to boot into your Mac system. It also acts as a restore point for the system. If you have a cloned hard drive, you can boot from the clone easily and get access to the system in an event of main internal drive boot failure. A drive containing sensitive data is often encrypted using the FileVault to protect it from an unauthorized access. Here, in this article, we will discuss methods to clone an encrypted hard drive on a Mac system. [Helpful utility to clone Encrypted Mac volumes]
Cloning the hard drive
Two methods can be used to clone an existing hard drive to another drive. One is to use the Disk utility functionality provided in with the Mac OS X and other to use the dd command and clone from the target disk mode. Cloning process involves following three basic steps as listed below:
- Decrypting the drive to be cloned.
- Making the clone of the drive.
- Obtain the resultant drive and re-enable the encryption.
Using Disk utility to clone the Hard Drive
This process involves using the built-in feature of the Mac OS X. Follow the steps below to clone an encrypted drive:
- Connect the drive to the system on which clone is to be done.
- Boot from the encrypted drive.
- Open the Disk utility from the Applications.
- Unlock the encrypted drive from here.
- Format the target drive with the configuration that is same as the source drive.
- Restore the contents of the internal drive to the external drive.
- Shutdown the system and boot from the external drive.
- Go to the System and preferences.
- Re-enable the encryption here.
This completes the cloning process. This method may seem to be too lengthy. Next, we discuss the method that involves the usage of dd command that may seem to be too technical for some users.
Using dd command
dd command can be used when target and source disks are offline that is they are not in the active state. Before this to happen, you need to boot from the source drive and turn off the encryption as explained in above-mentioned steps. In addition, you need to create a startup drive from where you can access the system and the target and source drives are offline. If the cloning is done using the existing internal drive, you end up in copying the data in an inconsistent state to the clone. This will result in a corrupt clone on the target drive. Then, follow the instructions below:
- Restart the system and boot from the startup drive keeping the target disk connected to the system.
- Open the Terminal application.
- Type and enter diskutil list that will display all the connected storage devices. Note down the target and source disks.
- Execute the command: sudo dd if=/dev/disk0 of=/dev/disk2 bs=128m conv=noerror,sync where disk0 and disk2 are the destination drives respectively (change the disks as displayed in your terminal).
- Ignore the error message showing “short write”.
- Now boot from the device on which the clone has been made and turn on the encryption again from the system and preferences.
This completes the cloning with the dd command. Using this command a bit-wise clone has been produced. To gain the speed of cloning you may try using rdisk0 or rdisk2.
Advantages of cloning a Hard Drive
Following are the advantages that a clone offers over a traditional backup:
- It does offer an instant data recovery. All that needs to be done is to connect the cloned drive to the system. Power on the machine keeping the option key pressed. Select the cloned drive to boot from and you are up and running in no time.
- Disk utility does offer a disk repair feature but there may be situations where a complete system is required to run third-party applications. In such a case, you can boot from the cloned drive and run those third-party applications as well.
- Suppose you get stuck while upgrading your Mac system to a newer OS X. With the cloned drive at your disposal, you can easily revert to the older OS X version on your system if there arises a compatibility issue with the new version.
To summarize the article, cloning is an important process that every Mac user must follow in order to avoid a situation where you lose all access to your system. Additionally, after completing the cloning process, you should immediately check the clone to verify that it is in a usable position when you require. A successful boot up from the clone should indicate the good health of the clone.