Use Energy Saver to Safely Shut Down UPS-Equipped Mac in Power Outage
If you connect your Mac to your UPS with a USB cable, you can use Energy Saver to shut your Mac down automatically in the event of a power failure… before the UPS battery runs out.