Backup Linux Using Clonezilla Live

There are many ways to backup Linux. There are different tools in the arsenal that you could use, such as tar, rcopy or  some backup software. One tool I recently started using is called Clonezilla, a cloning software similar to the popular Norton Ghost for Windows systems.

Clonezilla allows you to backup and restore file systems by cloning file systems or devices as image files. Clonezilla comes in two versions: Clonezilla Live and Clonezilla SE (Server Edition). Clonezilla Live is suitable for single machine backup and restore.

While Clonezilla SE is for massive deployment, it can clone many (40 plus!) computers simultaneously. Clonezilla saves and restores only used blocks in the hard disk. I’m using Clonezilla Live since I don’t need to backup and restore multiple computers.

To get started, you will need to download the Clonezilla Live iso file. Create a bootable CD from the iso file. Once the boot CD is created, you need to boot up from the Clonezilla Live CD on the desktop you want to perform a backup.

I recommend using a secondary USB drive for storing the backup image files. It will serve as a repository for your backup images as well as a restore point for later on. For further instructions, follow these instructions for using Clonezilla Live.

Increase Disk Space Of A Virtual Machine

One of the cooler technologies to arrive on the desktop the past  ten years is virtualization. With virtualization software, desktops are able to run multiple virtual environments on a host computer. You can easily run Windows on top of Linux and vice versa. Two of the most popular virtualization software that come to mind are VMWare and Virtualbox. I use the latter because it’s open-source.

My host system is Ubuntu 11.04 and I run several Linux distributions on it, as well as a single instance of Windows XP. Unfortunately, I’ve only allocated a 10GB for my Windows XP virtual machine, which is the default size when you create a new virtual machine or VM. After several weeks of normal use, I found out that I needed more disk space.

Increasing the disk space on the VM is not quite the easy as I thought it would be. In fact, the process was more elaborate than first conceived. I’m not going to write every detail of what I did, but I will explain the high level process. Hopefully, you’re able to get the idea. The process was trial and error, but the result was successful. I was able to get results twice now, on two different systems.

Tools

5 Step Process

  1. Clone the Windows XP virtual machine to a USB hard drive.
  2. Create a new virtual machine with a bigger disk space.
  3. Use GParted to create a new partition. NTFS in this case.
  4. Restore the Clonezilla image to the new virtual machine.
  5. Run GParted again to allocate the increased disk space.

Step 1.

Clonezilla a free software disaster recovery and disk cloning utility that you can readily download online. Choose the latest stable version from the website. Make a bootable CD from the ISO that’s provided on the download. Boot Clonezilla on your old virtual machine. You may need to disable the hard drive from your boot up options to make the virtual machine boot from Clonezilla. Make sure you are able to add the USB drive to the virtual machine. Follow the instructions how to clone your old partition to the USB drive.

Step 2.

Create a new virtual machine with a bigger disk space. I used 50GB this time around. I assume you are familiar with Virtualbox how to create a new virtual machine. Don’t load any OS just yet. Just leave it blank.

Step 3.

Boot the GParted on the new virtual machine. Just follow all the instructions on how to create a new partition. Allocate all 50GB to the new partition using the NTFS file system. NTFS is the native file systems for Windows.

Step 4.

Boot Clonezilla on the new virtual machine. Restore your Clonezilla image that you stored on your USB drive. Just follow the instructions how to restore a Clonezilla image.

Step 5.

Run GParted again. The current OS (in this case, Windows XP) is still using the older and smaller partition. It doesn’t recognize the new and unallocated partition on the drive. So, run GParted again and increase the size of your current partition. Use all of the unallocated disk space on the partition. Reboot. Windows XP ran a Chkdsk on bootup, and then rebooted. I checked the disk space and sure enough, it says 50GB.

Done

There you have it. How to increase drive space of your existing virtual machine.