Hi, I've been in tech consulting for over 30 years now. I've done projects from one person offices to enterprise installs serving over 10,000 users, and local area, metropolitan area, and wide area networks as well. I was the founding Director of Internet Services for the first 100% broadband end-user ISP in the US.
The simple answer is a line-interactive UPS, and I only recommend APC or Tripp-Lite to my clients, as big as you can afford.
The more complicated answer is, you need to calculate the power draw of the systems you are trying to run under the load conditions you expect to run before you can determine how much battery capacity it takes to keep them running for as long as you need to run them.
For example, APC will tell you that their Smart-UPS 1500VA SMC1500C will run a 150 W load for about 1 hour (most laptops use substantially less). One of these will cost you $470 right now at Amazon. You can buy more than one, as well, and there are both smaller and larger versions, as well as models with fewer or more features.
It may be cheaper to buy two smaller units than one larger unit.