There are several ways to clone Linux Partition using some external tools like partimage or Clonezilla.
In this exercise we are going to survey Linux partition cloning with a command called dd, which is most regularly used to convert or duplicate files.
Using dd command, we can copy whole disk or a partition. Please refer below example:
There are two drives: /dev/sdc, /dev/sdd
We will clone /dev/sdc1/ to /dev/sdd1 .
List down the partitions using fdisk command:
# fdisk -l /dev/sdc1/ /dev/sdd1
Below is the dd command to clone the partition /dev/sdc1/ to /dev/sdd1
# dd if=/dev/sdc1 of=/dev/sdd1
Mount /dev/sdd1 on /mnt to verify the cloning of files from /dev/sdc1 .
Similarly, we can clone entire disk/drive using dd command as below:
# dd if=/dev/sdc of=/dev/sdd
Note: The destination drive should be same in same size or bigger than the source drive.