12+ hours later (and a dramatic decrease in my blood alcohol concentration) I realize I skipped pretty much the most important part...
The HOW.
If this is something you decide to try, you would be doing yourself a great disservice (and potentially grievous bodily harm) if you did not confirm (or correct) everything I am saying here with more research.
0) Unplug the UPS from the wall. I really shouldn't have to tell you this. If, on the other hand, you would not have unplugged it had I not suggested that you do so, please read no farther and move onto a different post :smoking:
1) Open battery compartment of your UPS. If it is a sealed unit, smack yourself on the forehead and go get one that has replaceable batteries. APC units like the older SmartUPS series are fine.
2) Disconnect battery assembly from the unit and remove.
3) Measure the voltage at the end of the cable coming from the battery assembly. This is the input voltage required by the UPS. Also take note of the gauge of the wiring. You want to match or exceed that for all wiring you add to the system.
4) The input voltage will determine what batteries you need, and how to wire them. It will almost certainly be 12 or 24 volts, but it could be 6 or some other odd number.
If it is 6 Volts, buy one or more 6 Volt batteries and skip the part about wiring batteries in series.
If it is 12 Volts, you can skip this next step as well. Just get one or more 12 Volt batteries and start wiring the busses.
If it is 24 Volts, you will need an even number of 12V Lead-Acid batteries (Automotive/Marine batteries are ideal for energy density). You'll wire them in serial pairs, like this:
For each pair, it is suggested you put a 100amp fuse (24V) in series with the wire connecting them, just in case. The UPS will never draw enough current to overheat the wires, but its never a bad idea to be safe.
From now on, consider the pair a single battery, and the wire in the middle as part of the battery. The outside connectors are your positive and negative of your 24 volt battery.
On one side, connect all the negative terminals along a "bus" of wire. Do the same on the positive side with a separate "bus" of wire.
5) Now that the battery assembly is done, we re-use the original connector (or purchase a new, identical one) and connect your assembly. Plug into the UPS. Plug the UPS into the wall.
6) If you are still alive, congratulations! Seriously, if you are not 100% confident in what you are doing, don't do it. Find someone who knows what they are doing and have them set it up. The materials are expensive enough, it's worth paying someone else to do the wiring if it means a reliable and safe build. And if it saves just one grow, it will have been worth every penny.
What to expect: Much like the output circuit, the charging circuit of the UPS can only supply so much power, and it is limited (for safety). So while you will get amazing amounts of uptime from your battery bank, it will also take an amazing amount of time to charge. There are a few videos on YouTube that document how to build such a thing, and are probably well worth looking into if you are giving this any consideration. Here's one that's a little long, but he does it right.
At least once every few months, test each physical battery for voltage. If you find one that is not holding a charge, replace it. If the batteries are not sealed, consider storing the assembly outside if possible, since it will give off hydrogen gas as it charges. Just get sealed batteries to begin with. If you are the type that will be buying deep-cycle marine batteries that require topping-off of the electrolyte every so often, you probably already have plans for the outdoor structure to house them in.
As a final word, remember than if wired correctly, and safely, the system is no more "dangerous" than it was when it left the factory. The ONLY thing that is different is the reserve energy in the batteries.