Corporate Training, SEO, SMO, Web Designing & Development

Open Source Disk Cloning and Imaging Softwares

If you like this article, please share it with your friends and contacts on Google Plus, Facebook and Twitter using following buttons so that they can also enjoy the article:

Disk cloning is nothing but the process of copying the contents of one hard disk (or partition) to another disk or to an “image” file. I make backup regularly using rsnapshot tool, but I also clone my hard disk once or twice a month. This option allows me to restore my OS and installed software quickly. Linux comes with various utilities for performing disk cloning. In this post, I’m going to list my favourite open source disk cloning softwares that has saved my butt multiple times.

Old good dd command

The dd command allows you to make the low-level copying and conversion of data in raw format. It copies the standard input to the standard output. It can also be used for backing up the boot sector (MBR) of a hard drive or destroy data using /dev/zero or /dev/random.

Examples

To clone /dev/sdb3 partition to another partition called /dev/sdc3, enter:

# dd if=/dev/sdb3 of=/dev/sdc3 bs=4096 conv=noerror

You can clone a hard disk /dev/sdc to /dev/sdd:

# dd if=/dev/sdc of=/dev/sdd bs=1M conv=noerror

You can duplicate a disk partition called /dev/sda1 as a disk image file called backup.sda1.mm.dd.yy.img file:

# dd if=/dev/sda1 of=/path/to/safe/location/backup.sda1.07.28.12.img bs=4096 conv=noerror

OR

# dd if=/dev/sda1 of=/nfs/backup/images/backup.sda1.07.28.12.img bs=1M conv=noerror

To restore an image, run:

# dd if=/nfs/backup/images/backup.sda1.07.28.12.img of=/dev/sda1 bs=1M conv=noerror

The dd command can make backup of any partition regardless of an operating system. You can use it with FreeBSD / OpenBSD / Mac OS X / MS-Windows and so on:

Say hello to ddrescue

The ddrescue command copies data from one file or block device to another, trying hard to rescue data in case of read errors. The dd command will fail but ddrescue will continue:

# ddrescue /dev/sda /dev/sdb

Category: Latest News