Sunday, July 10, 2005

partimage works well for imaging ext3 filesystems!

Today I used partimage to save and restore an image of my /boot and /root ext3 filesystems on my Fedora Core 2 server. I used a bootable CD created from an iso found on www.sysresccd.org. This is a very nice little utility disc that has some file system tools in addition to partimage. To make it easier on yourself, I recommend you have a hard drive with a FAT partition to save and restore your filesystems to.

Here is the short list of steps to save a filesystem image:
1) make an iso cd from sysresccd.org
2) boot with the cd
3) create a directory and mount your FAT partition read-writeable to that directory
4) run partimage and save a filesystem image to the FAT filesystem. To test out how well partimage works for you, first save an image of a filesystem that is expendable. That way, if something goes wrong, you won't mind as much.
5) run partimage and do a test verification of the restore (does not write to the destination drive)
6) if the test verification works, go for the full restore
7) after you've restored, verify that all the applications on the filesystem work

Initially hesitant, I made sure the boot filesystem restored properly first. Then I moved on to my very valuable /root partition. Since I keep my filesystems simple (/boot, /root and swap), partimagimg those three filesystems was a relatively easy procedure for me. Especially since I mounted the FAT partition for reading and writing. The restore went without a hitch and was very fast, since I used the highest level of bzip2 compression. Bzip2 saves a lot of space, but does take some time to compress. I'd say it ran about 30 minutes to compress a 4GB filesystem. This is on a P4, 3.2Ghz w/1GB RAM.

Good luck!
Feel free to drop me a line or ask me a question.