You can use an uninterruptable power supply to keep your internet modem and router powered on during shorter outages. For longer outages a small generator is your best option. Another option is to use your phone as a hotspot if you have a data plan that includes hotspot data. Many of the popular unlimited plans include several gigabytes of hotspot data per month.