UPDATE 11/16/2009: You may want to read this summary article on a variety of backup/restore and reimaging options available for different operating systems. 

My favorite hard drive partition backup tool in the past has been Partimage. It works pretty well. In this blog entry, I document my successful attempt to use FSArchiver, a free utility on the SystemRescue (Linux) media.

Although I’m an old hand at using Partimage to backup a hard drive, I was a bit stymied by a new hard drive configuration that is much larger than I’m accustomed to. This means, Partimage creates a file that is very large and can take quite awhile to back a partition to…worse, the backup media I have is more along the 120gig variety rather than 500gig needed for a 230gig Partimage file, even compressed (229gig compressed).

As a result, I’m now looking for a solution that backs up ONLY what’s on the hard drive and nothing else. But how do you do that? I investigated the Free Space solution for DD but I haven’t quite seen a good example to try out, and I’m not sure what to do.

Another possible solution is FSArchiver, although it’s still in development. A little about FSArchiver below, which comes installed on a SystemRescue CD (which can be easily copied to a USB flash drive with UNETBOOTIN):

FSArchiver is a system tool that allows you to save the contents of a file-system to a compressed archive file. The file-system can be restored on a partition which has a different size and it can be restored on a different file-system.

Unlike tar/dar, FSArchiver also creates the file-system when it extracts the data to partitions. Everything is checksummed in the archive in order to protect the data. If the archive is corrupt, you just lose the current file, not the whole archive. Fsarchiver is released under the GPL-v2 license. It’s still under heavy development so it must not be used on critical data.

That said, I’m trying this solution out and hoping it will work. Here’s a comparison chart between FSArchiver and Partimage. Some of the features that jump out at me include the following:

  • Ability to restore the filesystem to a partition which is smaller than the original
  • Ability to restore the filesystem to a partition which is bigger than the original
  • Ability to do multi-threaded compression which is faster on recent computer with multiple cores/cpu
  • Ability to encrypt the data with a password

Anyone else have experience with this or can recommend an alternate solution that does what FSArchiver does?
Update 10/13/2009: While waiting for feedback, I decided to go ahead and try FSArchiver out on a Dell Latitude 2100 netbook. My hope is that the backup and restore process will work quickly. The process I followed is basically this one:

  1. Booted from my SystemRescue USB Flash Drive
  2. Since I’m working on a Dell Latitude 2100 netbook, I used the Altker32 on the System Rescue menu that popped up.
  3. I formatted a 120gig USB External drive to ext3 file system (as opposed to FAT32) to use as my backup drive with this command (Skip this step if you have a drive already formatted and ready to go):
    mkfs.ext3 /dev/sdd1
  4. In anticipation of “mounting” the external drive, I created a directory at “/mnt/backup” using this command:
    mkdir /mnt/backup
  5. Then, mounted the external drive (/dev/sdd1) as “/mnt/backup” using this command:
    mount -t ext3 /dev/sdd1 /mnt/backup
  6. I changed to that directory with this command:
    cd /mnt/backup
  7. Began the backup process using FSArchiver by typing:
    fsarchiver savefs /mnt/backup/netbook.fsa /dev/sda2
    This created a 5.8 gig file, which is an improvement over what Partimage would have done trying to backup a 230 gig hard drive partition! Here is the report FSArchiver gave me at the end of its process:
    Statistics for filesystem 0
    * files successfully processed:….regfiles=37329, directories=4308,symlinks=2,hardlinks=3,specials=0
    *files with errors:…………………..regfiles=0, directories=0, symlinks=0, hardlinks=0, specials=0
  8. When the backup process was completed, I restored the backup using the command below:
    fsarchiver restfs /mnt/backup/netbook.fsa id=0,dest=/dev/sda2

    Here is the report I received from FSArchiver when it was done:
    Statistics for filesystem 0
    * files successfully processed:….regfiles=37329, directories=4308, symlinks=2, hardlinks=3, specials=0
    *files with errors: regfiles=0, directories=0, symlinks=0,hardlinks=0,specials=0
    The restore process took 18 minutes, which is great!

To test whether this process worked, I restarted the netbook to see if the file system was restored successfully. What I didn’t notice is that Windows had not been shut down, but was just sleeping. The restore process didn’t change that.

So, successful test of FSArchiver!!

The next thing to do is figure out how to compress the backup file (that’s not hard) and uncompress it while restoring the partition. I’ll probably have to head to the FSArchiver forums for that one!

Update 10/13/2009; 5:43PM: Forum Response
Here’s what I posted in the forums:

Howdy! If I compress a partition backup with the following command:
fsarchiver savefs -z2 /mnt/backup/netbook.fsa /dev/sda2

what command do I need to restore it so that it uncompresses the compressed archive?

The response came a few hours later:

fsarchiver has built-in compression, and 9 levels are available: -z1 is very quick and provides bad compression, and -z9 is very slow and provides very good compresison. You only have to choose the level when you do the “savefs”. It will automatically uncompress it during the “restfs”. If you have more than one core in your cpu, you can make the compression faster using -j2 (for two compression threads), -j4, …

The quick start guide, and the page about compression will give you more details:

The answer is that it automatically uncompresses during restfs, or “restore file system.”

One of the things I missed in my first read of the quickstart was being able to split files into various sizes. This is great if your backup drive is FAT32 and can’t handle a 5.8 gig file or if you want to burn individual files to DVD.

So, my second test for FSArchiver is as follows:

  • Compress using compression level 3 (gzip -6 equivalent) with -z3 option
  • Use second processor (-j2 option)
  • Size backup files to 700megs each with the -s 700 option

That FSArchiver backup command I’m trying is as follows:

fsarchiver savefs -z3 -j2 -s 700 /mnt/udrive/netbook2.fsa /dev/sda2

That means that the command to restore the system will be as follows:

fsarchiver restfs -j2 /mnt/udrive/netbook2.fsa id=0, dest=/dev/sda2

Let’s see how it goes….

Ok, here’s my measures for the update:

  • Time to Backup Compressed – 30 minutes
  • Created 7 files at 733megs each, and one at 678megs

I’m going to restore now my first backup, then if that works, restore my second backup to test them both. Crossing my fingers!

Update 6:46 PM: Ok, it all worked awesomely!!!

Subscribe to Around the Corner-MGuhlin.org

Everything posted on Miguel Guhlin’s blogs/wikis are his personal opinion and do not necessarily represent the views of his employer(s) or its clients. Read Full Disclosure