Tuesday, May 31, 2022

cloning disks on Linux

Just a reminder to myself - dd can clone not just partitions but entire devices as well. https://linuxhint.com/clone-disk-using-dd-linux/ So, if only one partition needs to be cloned,

sudo dd if=/dev/sdb1 of=/dev/sdc1 status=progress

This will take only as much time as needed for the data present that one partition. 

If we want to make a complete clone of all partitions of one USB drive into another,

sudo dd if=/dev/sdb of=/dev/sdc status=progress

This will take much longer, even if the devices are mostly empty. For example, for 16 GB flash drives with only 2 GB of data, it took around 90 minutes on the Macbook Pro, using the default block size, going at around 3 MB per second.

16000 / 3 / 60 = 88.89 minutes.

No comments:

Post a Comment