It varies. The large carriers have been working through the years to add diesel, LP, or natural gas back up generators to all cell sites.
This is not always possible. High rise buildings for instance may not be able to handle the floor load or vibration. The same is true of some older structures. Local zoning regulations sometimes forbid this for appearance or noise reasons.
Generally, these generators will have 24 hours of back up fuel. More remote, harder to get to areas may have 48 hours.
Disaster recovery plans have refueling schedules built to insure generators stay running.
In the event a permanent generator can not be installed, each site is fitted with a receptacle that will support a towable (50 Kw and up) generator, although even this is not always possible. A site located say on the roof of a 20 story building would need a receptacle at ground level, in a place you could securely and legally park a large, noisy generator for extended periods. The challenges of running 20 stories of conduit inside an existing structure are sometimes insurmountable.
Sites with permanent generators have 4 hours of battery backup as well, in the event the generator doesn't start.
Sites with receptacles only have 8 hours, as do sites with no possibility of any sort of generator hookup.
Remember though, that batteries are heavy. Some buildings can't support 8, or even 4 hours of batteries. In that case, you do the best you can.
I managed, along with many, many others, recovery from Ike, Rita, Sandy…and plenty of other storms, tornados, man made disasters, like the bridge collapse in Minneapolis. and it is a complex logistical monster. For Ike, the train of recovery supplies, water, fuel, generators, kitchens, RVs for relief crews to sleep..stretched 22 contiguous miles on one interstate. Booking every hotel room within miles. Helicopters for damage surveys and delivery of supplies, even generators. Getting cash, ATMs don't work….the list is amazing.
When I left the business Verizon was farthest along with this process, the other carriers playing catch up.