Disk Imaging with Clonezilla

When you spend a lot of time looking at different Linux distributions you get used to reading the phrase, “… is a general purpose operating system with a focus toward…” Sometimes it’s a focus toward ease of use, sometimes it’s a focus toward improved package management, other times it’s security. There are a lot of general purpose Linux distributions out there, which is good, but one thing I love about Linux is its ability to fill a niche. For instance, it would be difficult for me to get through a work week without having tools such as GParted Live, for partition management;
Knoppix, for hardware detection; and Clonezilla, for saving and restoring disk images. This past week I had a chance to talk with Steven Shiau, one of the developers behind Clonezilla.

OSNews: Could you start by explaining why you started Clonezilla? Were you hoping to fill a gap in the open source community, or was it a hobby?

SS: On the 29th of March, 2003, the computers in the computer classrooms at the National Center for High-Performance Computing
(NCHC) were all upgraded. However, the deployment software did not support the new hardware. That’s why we started the Clonezilla project. In the beginning, we started the Clonezilla server edition first, then, in 2007, Clonezilla live was created.
Actually in the beginning it was not a hobby, and we just wanted to solve the problem we had. However, yes, now you can say it’s a hobby, and it’s our jobs, too.

OSNews: Clonezilla is a flexible and powerful tool, but some users may be put off by the interface. Are there any plans to make Clonezilla more novice-friendly?

SS: Yes, we hope we will have a GUI version this year.

OSNews: Would you please explain a little about how Clonezilla works?

SS: Clonezilla uses some programs, including sfdisk, partclone, dd and more to do the clone or image job. Basically it processes the partition table by sfdisk and uses partclone to save or restore the
partition data, and dd to save or restore the MBR. Besides, there are some options in the expert mode which you can choose to use different imaging programs to process the partition. For example, you can force the use of partimage, ntfsclone or dd to process the partition.

OSNews: Clonezilla has some limitations. For instance, the destination disk must be the same size or larger than the original disk. Do you have plans to work around those limits? What about the ability to extract files in a saved image?

SS: That’s true, Partclone does have such a limitation. When we developed Clonezilla and Partclone, our purpose was to image and clone, not really for backup purposes. To address this issue, we did try to use another program “fsarchiver” as the engine. However, it does not support the pipe function, and that’s what Clonezilla SE (Server Edition) needs for multicast clones. We still think it’s better to have only one type of image both for Clonezilla live and Clonezilla SE. However, maybe we will have second thoughts in the future.

OSNews: Both the Live edition and the Server edition are powerful tools, which you offer for free. Are there any plans on selling Clonezilla or offering support contracts for businesses?

SS: So far we do not have such a plan. We enjoy sharing with all of the people in the world.

OSNews: What else is left to do? What can the community do to help?

SS: If possible, try the Testing branch and if a bug is found, please tell us. We will do our best to fix it. For example, recently the Testing Clonezilla live (1.2.4-14 or later) supports FreeBSD, OpenBSD, NetBSD and VMWare ESX imaging. Therefore if it’s interesting to you, please give that a try and report bugs to us. By doing so, we can release a stable Clonezilla live more frequently.

I’d like to thank Steven for taking the time to talk about the project.

Clonezilla’s website has a simple, clean layout that’s easy to navigate. The project has gathered a good deal of documentation, including frequently asked questions, over the years and placed it on display. The project also has a forum where people can get assistance and share suggestions with each other. Additionally, there are some good step-by-step guides to using the cloning software.

The Clonezilla Live CD starts up much like any other Linux distribution, displaying a boot menu with various boot and test options. Taking the default option displays a few screens of text during the start-up process and then kicks off a series of curses-based menus. Each menu asks the user a question, usually offers some tips and presents a handful of options. The user selects one of the multiple-choice responses and is moved to the next screen, making the Clonezilla interface essentially a curses-based wizard. There are several steps in the process of creating or restoring an image and I’ll walk through an example now.

Boot menu

First, Clonezilla asks the user for their preferred language and keymap. Then the user is offered the choice to bail out to a command line or continue with the cloning process. Assuming we continue through the cloning steps, the wizard asks if we’d like to copy one device directly to another or deal with an image file. For my experiment, I chose to use an image file. Clonezilla supports several ways of retrieving or creating images, including accessing them on a local drive, across a secure shell connection, via Samba shares or by using NFS. I decided to have my image saved to a remote server via secure shell. The next step is to provide network settings or have Clonezilla detect them via DHCP. Once my network settings were detected, I was able to provide the hostname of my remote server and the port on which the secure shell service was running. I then entered the directory name on the server where I wanted to save my image and provided my username and password. Clonezilla then asks if the user would like to save or restore an image and, additionally, if we should deal with the entire drive or a single partition. I chose to save my entire drive. Then I provided a name for my new image file and selected which local disk I wished to clone. The user has the option of choosing, if they wish, additional parameters, such as the compression method and the maximum size of the image before it’s broken into separate archives.

After all of that, Clonezilla goes to work copying the drive to a remote image file. Detailed progress is displayed, showing how much time has passed, an estimate of how much time the cloning will take and the percent completed so far. I’ve found, given a steady network connection, the estimated time remaining is very accurate. Depending on the size of the drive and the speed of the connection, I’ve found Clonezilla able to save or restore a modern drive in about fifteen to thirty minutes. Once the operation is complete, the user is asked if they’d like to perform another cloning, shutdown or reboot. Restoring an image back to a hard disk or partition is almost an identical series of steps through the Clonezilla wizard.

Wizard menu

Some people may look at the many steps involved in creating an image and be put off by it, but the number of screens is a bit misleading. Having used Clonezilla, Ghost and a few other commercial imaging products, I find the current version of Clonezilla to be the most intuitive and easy to learn. This is largely due to the step-by-step nature of the wizard. There’s no guessing involved in what the user needs to do next or what to click on. Each step is presented as a simple question, usually with some advice and a few options. When in doubt, the user can generally take the default and get through the experience without any trouble.

Another thing Clonezilla has going for it over many other disk imaging products is it’s amazingly light on resources. Due to its simple interface and efficient inner workings, the cloning software can easily work on machines with less than 256MB of memory. Given the flexible nature of the Linux operating system and its wealth of drivers, Clonezilla works just about everywhere. The image files Clonezilla creates are of a reasonable size. Generally the cloning process manages to make an image of equal size to the amount of data on the disk. For example, were I to have 2GB of data on a 160GB drive, an image of the entire drive would be about 2GB with the default compression method. Actually, the term “image file” is a little misleading. For each image Clonezilla creates a directory into which it puts a handful of files. These files consist of the compressed image, MBR information and other various pieces of data the program will need to restore the image back to its original state.

There are some limitations. As pointed out earlier, Clonezilla can’t restore an image to a drive that is smaller than the original drive. It also doesn’t allow for retrieving specific files in an image, it’s the whole partition or nothing. On the other hand, the project releases regular updates, keeping Clonezilla abreast of current hardware. New features, such as a wider range of supported partition types and interface improvements, are regularly added while maintaining backward compatibility. I wouldn’t recommend the project as a way to maintain regular backups, but it does make for a quick and easy way to restore a system back to its original state. It’s also a great way to deploy many identical workstations simultaneously — one person with a handful of Clonezilla CDs can image dozens of workstations in a few hours, much faster than installing an OS, adding the desired applications and applying patches. I heartily recommend looking at Clonezilla, both for organizations and for people at home who would like to create their own restore points.

10 Comments

  1. 2010-03-24 4:18 pm
  2. 2010-03-24 4:32 pm
    • 2010-03-24 4:34 pm
      • 2010-03-24 4:39 pm
  3. 2010-03-24 5:01 pm
  4. 2010-03-24 5:28 pm
    • 2010-03-24 7:06 pm
  5. 2010-03-24 8:27 pm
  6. 2010-03-25 8:34 am
  7. 2010-03-27 5:01 am