I am looking to use an embedded Linux distro such as Tiny Core as a automated recovery type tool. Basically, the user would choose to boot into Tiny Core from the boot menu, then if a USB is plugged in containing a ghost type image of the drive (it would contain a unique UUID that udev rules would detect and only then would it start imaging), it would restore the entire hard drive. Now my problem is finding a utility like Ghost for Linux that will do the imaging. The best part about Ghost is that it does a file-by-file copy so it's very fast and the resulting compressed image is small, and it dynamically resizes the drive so if you are imaging a 10 GB drive onto a 20 GB drive, it will image the drive and then resize it automatically, fixing the partition table if necessary. dd is obviously not an option for this reason, it copies every sector of the drive and it does not have the ability to dynamically resize so if for some reason the destination drive is even 1 byte smaller than the source, it will fail. partimage has similar issues. CloneZilla is the only tool for Linux that I've seen powerful enough to do something like this, but it's obviously it's own distro and not able to be integrated into a Linux distribution. Since CloneZilla is just a collection of low level tools though, anyone know how it actually clones a hard drive? What would be the best way to do something like this? I've been searching for an answer on this for years and still have not found a solid solution. 'Til this day, we use an ancient version of Ghost because it images whatever we need flawlessly, but we'd like to get away from proprietary tools and DOS and head towards an open source solution.
Image HDD in Linux (functionality like Norton Ghost)
linux;cloning;clonezilla
FSArchiver (http://www.fsarchiver.org/Main_Page) may do what you're looking for.  Disk images include only data, not free space, and can be restored to disks of differing sizes.