Using an Uninterruptible Power Supply
You may have your computer, monitor, printer and other peripherals plugged into a power strip with surge suppression, but that won't help if the power actually goes out. In the event of a power sag or blackout, whether it's for a half-second or half an hour, your computer is about as useful as a boat anchor -- unless you have an Uninterruptible Power Supply (UPS) device.
A UPS is a device that protects your electronic devices from power outages, sags, and surges, and also acts as a battery backup in the event of a blackout. Like a power strip, the UPS plugs into the wall outlet and the devices you want to protect are plugged into the UPS. Typically the battery power of the UPS will allow you to operate your computer for 15-30 minutes during a power outage. If the outage lasts longer than that, at least you will have the opportunity to do an orderly shutdown with no data loss.
Look for a UPS that offers at least 600VA power handling capacity and the special cable and software that will automatically shut down your computer before the UPS batteries die, just in case you're not at home when the power outage occurs. If it has phone and network ports to protect those devices from surges, that a plus.
My UPS Configuration
I personally use a Tripp Lite TE600 (approximate retail US$299) and it provides power to five things in the event of an outage: My PC, monitor, router, cable modem and desk phone. I included the router, cable modem and phone because sometimes the power fails but the cable and telephone services are unaffected. If you have a laser printer, I recommend that you DO NOT connect it to an outlet on the UPS that provides battery power, because laser printers suck down LOTS of power and will drain your battery very quickly.
I had an opportunity to test my UPS setup recently... during a storm, there was a power outage for about 15 minutes. The lights went out, but my computer and internet connection stayed on without missing a beat. I was able to make phone calls, send & receive emails, and browse the web while my neighbors were all cursing the darkness. Since then, the lights have flickered a few times, causing the other computer in my office (not connected to the UPS) to reboot. But my primary UPS-connected machine has been happily unaffected.