I'm not sure if it is the best device, but the backup power supplies for personal computers work well. They are a little pricey, depending on how many you need, but are great for intermittent short breaks in power.
For example,
http://logicbox.zoovy.com/category/upsbatterybackupunits/
For example,
http://logicbox.zoovy.com/category/upsbatterybackupunits/