Yes, you can use a UPS to power your modem and router during a power outage. Generally the battery will last for a few hours if nothing else is plugged into it. A small generator can be used if you need to run your modem and router during an extended power outage. Using your phones hotspot feature is also another option if you have a data plan that includes hotspot data.