- slide 1 of 5
The dd command
The dd command is used to make a byte-by-byte copy of a partition or hard drive. This is a low-level copy, and includes everything on the disk, even deleted files that are physically present on a disk. The syntax for disk cloning with the dd command is dd if=input_file of=output file.
For common uses of the dd command, including disk and partition cloning, check out Michael Dougherty's article The Linux dd Command.
- slide 2 of 5
Partimage is a curses based disk cloning utility for most Linux filesystems. Curses based means that the interface is not a typical graphical interface, instead it navigated by using the keyboard arrow, tab and space keys, similar to your computer's bios. Partimage does not work on ext4 or btrfs filesystems.
Partimage saves the partitions to an image file that can be compressed, split to multiple files, and copied to CD, DVD, or saved across a network. It works differently than the dd command as it only copies data from the used portions of the disk. It will not copy empty blocks.
For step by step instructions on how to use Partimage check out jlwallen's article Backup Linux Partitions with Partimage.
- slide 3 of 5
Mephisto Backup is a disk cloning tool written in Java. The program is command line based with a simple text interface. It uses the tar and rsync utilities to create the backup images. These images can then be used to create a Live CD or DVD for future restoration. Alternatively, you can use Mephisto Backup to sync two hard drives using the rsync utility. This application even has the ability to schedule regular backups and save backup configurations.
- slide 4 of 5
Clonezilla is another curses based cloning utility. Like Partimage, it only copies data on the used blocks, ignoring the empty blocks. Clonezilla is a client server application, eliminating the need for Live CDs. However, there is a single machine backup solution available, called Clonezilla Live. The application is based on DRBL (Diskless Remote Boot Linux), Partimage, ntfsclone, partclone, udpcast and dd. Clonezilla supports all the Linux filesystems, including ext4.
- slide 5 of 5
The dd command is useful if you want an exact disk clone, including empty data blocks and deleted files. For this reason, it is often used in computer forensics. If you don't need a clone that exact, you can use one of the other options. Each has its own set of pros and cons. The best way to choose between them is to read the documentation for each, then perform a test run. Always make sure your data can be restored as easily as it can be backed up.