Several companies make back up power supplies that are basically batteries. They come in all sizes, from sump-pump backups to whole-house backups. They look to be a lot more expensive than a generator.

I imagine you could rig a generator to provide power to the backup unit and have a sort of buffer that would eliminate power fluctuations to the generator. Don't know if this means that the generator will operate at peak efficiency (max MPG if you will) or if it would just pump out the maximum amps until the battery was recharged.

http://www.emergencypowersupply.com/