APC says:
the point where a generator begins to have a cost advantage over extended run batteries for a typical 2 kW system is over an hour. When a typical 12 kW system is considered, this point becomes closer to 20 minutes.
When you consider our low prices on UPS battery cabinets and our high prices on electrical service and generators... I would go with the cabinets.
My final point is that one of our Caribbean customers wanted a ups instead of a generator and promptly bought a Symmetra system but then added an array of 32 car batteries.