Regular workstations (PC’s) and servers are often plugged into a UPS (Uninterruptible Power Supply, or Battery Backup) with a USB cable so that the UPS can tell the computer when battery voltage is low, and to perform a clean shutdown.
A Raspberry Pi does not come with a power switch. If you were to cut power without running a proper shutdown command, you can easily corrupt the SD Card.
We can do the same with a Raspberry Pi. The following site outlines the procedure for setting up the monitoring software so that your Raspberry Pi will properly shutdown when the backup battery gets low. If you have several Raspberry Pi’s, they all can get the shutdown command from the same UPS.
We use the CyberPower 750 shown. A Raspberry Pi can run for weeks before the battery runs low.
No more corrupted SD Cards, and no more worries!
Alternate method using APCUPSD – https://www.raspberrypi.org/forums/viewtopic.php?t=14447