How to disk clone drives with only your terminal

This works for mac or Linux base systems. You can do this on window but you may need to install extensions.

So you want to copy one disk drive to another disk drive? Or disk image to disk, Or image to USB etc?

In my opinion, this is the best without installing third-party apps thats floods your system with unknown stuff. And how often, do you disk clone drives anyways? For me it’s very rarely, only if I want to increase storage.

Need to know before you start. Warnings!!!

  • You can only clone disk drive equal to or to greater disk drive you are copying to. (100gb > 100gb, 120gb. 500gb > 500gb or 512gb. 500gb > 1tb).
  • Need to make sure you know which drive you are cloning to, as this will destroy all your data if you get this wrong.

Let’s start, plug in your external drives, preferably with USB3.0 or higher. As transferring larger storage can take hours or even days.

Usually, you will get a pop-up about your USB device, to ‘Initiate’ or ‘Ignore’ or ‘Cancel’. Just hit ‘Ignore’.

Now run, the below command to list out all drives:

diskutil list

You should see something live this. In my example /dev/disk10 is the source and /dev/disk11

Once you’re certain, which disk to copy to. Run the below command. replace (source & destination)

sudo dd if=<source> of=<destination>

There is no progress of transfer. So, you need to trust your system and switch of sleep mode.

Once complete you need to make sure you eject drive properly. Otherwise this can corrupt disc.

Eject disk:

diskutil unmountDisk /dev/disk10

And there you have it! Its as simple as that. I know the downside is, you cannot see the transfer progress, but in my opinion if you have the right connection, i.e USB3.0 or higher. This will help transfer speed massively. And just be patient… as you don’t want to transfer with corrupt data.

CATEGORIES:

Tips and tricks

Tags:

Comments are closed