One of the coolest things about the Pi is the ability to leave it on all the time without worrying about your electricity bill. It uses very little power, but can still do so many different things 24 hours a day. The Pi is also very stable for a cheap computer when left alone. Mine is currently at 47 days of uptime (you can check my Pi's status here: http://treddell.com/pi/) and my friend's Pi was at 101 days at one point.
However, a brief flicker in your electrical source can bring your uptime crashing down to 0 days and interrupt whatever the Raspberry Pi was doing at the time. But you can check out this project to prevent this: Raspberry Pi Battery Backup.
This tutorial from Repair Hub unfortunately uses the backup as a quick way to gracefully shut down the Pi. I'm interested in a cheap solution to keep the Pi running until the power comes back on or the battery is depleted. This UPS System (uninterruptable power supply) looks like it would do the trick. It would run for about ~40 min at 10 W of output. A Model B Raspberry Pi is rated at using 3.5 W while idle. This means we could get 114 minutes on battery backup. Not too bad.