What is doClone?

DoClone is a free project developed in C++ for creating or restoring GNU/Linux systems images. It can also work on a LAN to transfer data within computers. This tool provides an easy way to manage the GNU/Linux installation in offices or schools, including machines with different hardware, e.g., different hard-disk sizes, using only the space required by the data.

Features

  • Supports 12 filesystems.

  • Supports 9 disk labels.

  • Clones disks or partitions with different sizes.

  • Clones selinux systems.

  • GRUB boot loader restoration.

  • Multiple cloning on a LAN.

  • UUID's and filesystem labels cloning.

  • Live cloning: a system can make images of itself.

License

This program is free software and is distributed under the GNU GPL v3 License.

Documentation

Supported disk labels

DoClone works with all the libparted supported disk labels:

Disk Labels
Aix
Amiga
Bsd
Dvh
Gpt
Mac
MsDos
Pc98
Sun

Supported filesystems

DoClone uses libblkid to detect filesystems, and also uses some external tools to format them. The filesystem labels and uuid's management is performed by libparted library.

Here is the filesystems supported list, and the libraries and tools required for formatting or mounting it.

Filesystem Required software
ext2 mke2fs
ext3 mke2fs
ext4 mke2fs
fat16 mkdosfs
fat32 mkdosfs
hfs mkfs.hfs
hfs+ mkfs.hfsplus
jfs jfs_mkfs
linux-swap mkswap
ntfs mkntfs
reiserfs mkreiserfs
xfs mkfs.xfs

Software Required

It is necessary to install libparted 2.2 or any later version, libe2fs, libuuid, libglibmm, libblkid, liblog4cpp and libselinux.

Platforms Supported

Until now, doClone has been compiled only in GNU/Linux.

Local use

DoClone local use is limited to create images of a disk or partition, or to restore previously created images.

Network use

DoClone is allowed to work over the local network. This way, it is possible to restore images from another computer. For this purpose, it is possible to work in two modes: the Unicast/Multicast and the Chain Mode.

Unicast/Multicast

There is one server and one client or more. This server must run before, and then wait for the clients. After that, the clients are able to connect with the server, which will send them its data.

Chain Mode

This mode creates a computer chain, where every node sends the data to the next one in the chain. The clients run before, and then the server sends a broadcast package to find out who is listening. After that, it sorts out the chain by sending to each client the IP address of the next one, and starts transferring the data to the first one.

After using doclone

After creating a complete hard disk image, the boot sector is also saved. This means, if the original system has the GRUB bootloader installed, it will be cloned, the same as all of its options into the receiving machine. If the original machine has not got GRUB, the first 440 bytes of the disk will be cloned "as is".

Partitions

It is possible to create a 40GB hard disk image, and afterwards to restore it in a 20GB hard disk (e.g.). The program only saves the files, so if the original data only takes 10GB, the image will be restored with no incidences. In addition to this, the partitions adjust to the proportion that they occupied in the original drive, i.e., for an original partition that takes the 70% of a 40GB disk, it will take the 70% of the 20GB disk on the client as long as the data fits on that space. In other case, doClone will return an error. If the original disk is smaller than the destination one, the partitions will be increased proportionally.

Source Code Repository

The source code of doClone is hosted in Savannah git server. See the git browser view for more information.

Download the source & compile it

You can download the source to your computer by typing:

git clone git://git.sv.gnu.org/doclone.git

Then, just execute the following commands:

autoreconf -i
./configure
make

The package comes with two scripts: config-gdb.sh and config-nogdb.sh with two possible sets of parameters for the ./configure script

Libdoclone

Libdoclone is a free library developed in C++ for creating or restoring images of GNU/Linux systems. This is the library that doClone uses to perform its work, it can either create copies on the fly, i.e., sending the information directly over the network, without creating an image first; or creating and restoring the image locally .

Libdoclone uses libparted

For further information, please read the Doxygen reference: