A quick look suggests that it would cost you about $480 to get a UPS that can handle 500 watts for two hours:
http://www.apc.com/us/en/tools/ups_selector/home/load.
But they're not designed to be frequently discharged. Recharging and mining at the same time after a power outage also increases your power consumption greatly until the batteries are full.
Also, there are two main types of UPS:
- line interactive: it passes the power from the outlet through to your mining rig and only switches to the battery if there's a power outage. This is the cheaper/simpler solution and depending on your PSU in the mining rig the UPS might not switch to the battery quick enough so your rigs could restart. Unlikely, but possible especially with lower end computer PSUs.
- online or double conversion: the UPS converts the input voltage to the battery voltage and converts it back again to 120/230V or whatever you can set it up to. This is more expensive, there's a few percentage of loss during the conversion (just like with a regular PSU) but it doesn't have to switch, it continously provides electricity. It also helps with bronwouts (when voltage is just low) but you don't need help with brownouts that since your computer PSU very likely can handle lower voltages but it's nice to have with other appliances.
I'd rather just setup the rig to continue where it left off after a power outage:
- "Restore on AC/Power loss: Power on" in the BIOS so the computer turns on automatically as soon as it gets electricity;
- put a shortcut of your miner (.bat) in start menu/programs/startup so that mining starts when the system boots.
- don't run wallets on that computer as their blockchain will eventually corrupt and require a resync or restore if you have a backup.