An uninterruptible power supply (UPS) provides a limited amount of power to our attached devices in the event of a power outage. Furthermore, it provides protection from power surges that can seriously damage your computer's internal components, and thus should be an integral part of your computer system. For relatively low cost, a UPS protects your hardware investment and lets you shut down your system without data loss in the event of a power outage.

You can purchase a UPS from a retailer such as Amazon or NewEgg

getaway