As for backup power, it's gonna cost you out the wazoo. Assuming you're running no more than 600 W of lighting, ventilation and other electrical loads, and you expect about 2 hours or more of power loss at any given time, you're looking in the neighborhood of US$1,500.00 and up for a suitable battery-backup UPS. I wouldn't worry too much though. As stated, plants adapt fine to a slightly erratic lighting schedule. After all, outdoors, clouds cause very erratic lighting, often with whole days being nearly dark yet plants have done fine under those conditions for hundreds of millions of years. It may not be ideal, but they should do fine, nevertheless.

As for timers, there are several digital models available with battery backup, so there's no need to reset them. They'll recover on their own following an outage and contue the timing cycle just as if the power had never been lost.