I've thought about this also. I wouldn't want a reef system to tank during an extended outage. Pretty much what I've heard is that anything over a couple hours will likely damage the system and about 6 hours you can pretty much forget it.
Being an Electrical Engineer, I know that most battery backup systems that you can buy in your local Wal-Mart or Target stores (APC comes to mind) that are strictly battery backup will provide essentially a square wave output when operating (versus a sine wave from the power company), and most pump equipment could potentially be damaged under such a power source - they're just not designed to operate on that type of power. So I would think that at most, you would just want to select one power head to put on battery backup and make sure you have enough established Live Rock in the system to support biological conversion during an outage.
As far as the time frame, it's simply a function of battery capacity versus demand. A small power head (Hydor Koralia 2 or 3) could probably run for an hour or so I'm guessing (totally guessing) which would probably get you through a short term outage.
If you wanted to run the main pump off a backup system, I would think the ONLY way to do it would be to do it right, and buy a "True" Online Double-Conversion UPS. This device takes the input from the power company, converts it to DC, then back to AC to the equipment it supplies power to. The batteries are charged on the DC side. This type of unit provides a nice clean sine wave (it also cleans up the utility power signal so you will extend the life of your equipment) but it also costs quite a bit - usually $300 to $500. You will usually get longer running time also, since these are designed to keep a larger piece of equipment running, such as a computer server long enough to keep the system running during a short-term outage, and with enough time to perform a proper system shut-down once the batteries start to run out.
A heater would probably not be a good choice of equipment to run on a battery backup system. Your tank temp will not drop to the danger point during a short-term outage of a couple hours. Keeping the water moving in the system is what is most critical.
If you have a long-term outage, then you have a whole different set of problems. Really the only sure-fire method of protection from a long-term outage is to buy a backup emergency generator and connect it to your electrical panel. Ideally, you could run a separate panel from your main panel in your house dedicated to your reef aquarium, and when you have an outage you could throw the breaker and connect the generator to the aquarium panel, then when power comes back on you shut the generator down and close the breaker and you're back to normal.
I guess your method of backup power really depends on 1) $$$ 2) the possibility of long-term outage in your area. If you live in a remote area, it probably should be part of your design. If you live in a big city, probably not as much of a chance of a 6 hour outage, but I live in Des Moines, Iowa and we have ice storms every couple years that take out power and there's no way to tell where and for how long.
Well that was probably more than you wanted but I'm pretty bored today...