Saturday, March 27, 2010

Backing filesystems up with FSArchiver

If you are going to backup your filesystem and looking for a simple yet powerful backup solution, then you may want to take a look at FSArchiver. This is a tool I've discovered just recently and despite its youth (first version released on November 2008) it did the job just perfectly. If you want more details, read on...

You probably already know tar or partimage: they are good, but have some limitations. Tar does the good job when comes to backups, but is not very convinient or easy to use for big filesystems (you need to be careful about passing it proper options to preserve file attributes, you need to take care of splitting resulting archives into smaller ones by yourself etc.). Partimage makes copies of entire partitions (and does it fast and well, copying only portions which are really used), taking a lot of burden from you, but you can only restore such images on partitions of same or larger size. Other than that, it still doesn't support ext4.

FSArchiver combines best features of tar and partimage: it works at the file level and creates a backup copy of entire filesystem, that can be then restored to a partition of any size (as long as it has enough space to hold the data, of course). When restoring the backup, it recreates target filesystems by issuing mkfs with proper flags and label. It supports many popular filesystems, including ext3, ext4, xfs, reiserfs and ntfs). FSArchiver can take advantage of dual/quad core CPUs (just pass it -jX flag, where X stands for the number of compression threads to run) and it does its job really FAST.I was really amazed that it took me just around 3-4 hours to backup and then recreate two filestystems (around 70GB worth of data in total) and the size of backup archives was only 25GB! So, to me, FSArchiver is a real winner. Sure, partimage may be faster, but if you need to rearrange your partitions with different sizes (this is what I had to do - and yes, I know about parted and gparted, but didn't want to use them), then FSArchiver is the tool you need.

Be warned though... FSArchiver developers claim it shouldn't be used on production environments yet, however it is well tested and has proven the ability to correctly save and restore filesystems on various Linux distributions. You choose.

No comments: