Here is how you can clone and back-up important partition on Linux PCs/TabletsSoftware Utilities
Linux is an OS which is loved by computer professionals worldwide. Linux users like to partition their HDD and format them to different file-systems . Linux provides two built in ways- use of dd and cat commands for cloning one partition to another. I’ll discuss each of them and at the end enlist some GUI based software utilities. Cloning a partition using dd command The dd command is a simple, yet versatile and powerful tool. It can be used to copy from source to destination, block-by-block, regardless of their filesystem types or operating systems. A convenient method is to use dd from a live environment, as in a Live CD. ( Be careful in choosing values for “if” and “of” attributes. Interchanging values will format your source partition and you will end up with loss of data.) Cloning a partition From physical disk /dev/sda, partition 1, to physical disk /dev/sdb, partition 1.
dd if=/dev/sda1 of=/dev/sdb1 bs=64K conv=noerror,sync
You can also clone entire HDD by using:
dd if=/dev/sdX of=/dev/sdY bs=64k conv=noerror,sync
This will clone the entire drive, including the MBR (and therefore bootloader), all partitions, UUIDs, and data. Note that:
“if” stands for input file while “of” stands for output file. » “noerror” instructs dd to continue operation by ignoring all the read errors(default is to halt at an error). » “sync” fills input blocks with zeroes if there were any read errors, so data offsets stay in sync. » bs= sets the block size. Defaults to 512 bytes, which is the “classic” block size for hard drives since the early 1980s, but is not the most convenient. Use a bigger value, 64K or 128K. Also please read this before proceeding with bs: If everything goes as planned, this will cmone your partition to the target partition. If you are positive that your disk does not contain any errors, you could proceed using a larger block size, which will increase the speed of your copying several fold. For example, changing bs from 512 to 64K changed copying speed from 35 MB/s to 120 MB/s on a simple Celeron 2.7 GHz system. But keep in mind that read errors on the source disk will end up as block errors on the destination disk, i.e. a single 512-byte read error will mess up the whole 64 KiB output block. Lets talk about the “cat” command Follow these steps to get the job done:
cat /dev/sda1 /dev/sdb1 (first attribute is source partition and second one is the destination partition. 2. After this the cloned partition has to be mounted to /mnt and both mount point directories are listed to check if any files are missing.
mount /dev/sdb1 /mnt # ls /mnt # ls /boot
Now you can compare the original partition with /mnt to confirm that cloning has been successfully completed.
Software Utilities
These are available either as commercial tools or free tools: 1.CloneZilla 2. Acronis True Image In case you face any problem, feel free to ask in the comments, we’ll resolve ASAP.