I would think tho if you had your cable modern and router hooked up your upc with the battery and it still ran. Then you wouldnt have to worry about damage from blackouts but maybe from thunder storms.
Blackouts only cause damage when junk science reasoning creates the corresponding urban myth. Blackouts never cause electronics damage. Even international standards 35 years ago defined that. Even 1950s TVs were never harmed by blackouts. Too many only *know* because they saw damage, then blamed a blackout.
Same is the protection provided by that UPS. Damage is most often due to a surge that seeks earth ground. Notice the many who do not know that even an ethernet cable can be part of that surge path. Worse, a surge protector circuit adjacent to the computer may have given the surge a path that bypassed protection inside the power supply. Just another reason why surge current was using the ethernet cable.
Many (often the majority) only know what retail store salesmen told them or their friends. How does a surge work? That energy is either dissipated harmlessly in earth. Or it finds destructive paths to earth via household appliances.
Anyone who lets the surge enter the building means the surge will hunt for earth ground destructively via appliances. Obvious, in your case, which was the better path to earth. Obvious to the few who know that DSL wire or cable is an excellent path to earth. Not obvious to the many who assume a protector will somehow stop what three miles of sky could not.
You let a surge into the building. Plug-in protectors typically give surges even more paths to find earth destructively via adjacent appliances. And yes, if that router was connected to the same AC circuit as the protector, then that router had the same protection as everything else adjacent.
How do facilities that must never suffer damage install their protectors? They do not waste any money on plug-in UPSes or power strips. Why? They need protection. They don't need to enrich the myth purveyors. Every facility that must no suffer surge damage locates protectors as close to earth ground as possible and up to 50 meters distant from electronics. You need the same thing. Only one 'whole house' protectors so that everything (even the dishwasher) has surge protection.
What provides surge protection? Not any protectors. Show me the plug-in protector numeric specs that claim protection? Those numbers do not exist. That plug-in UPS or power strip manufacturer does not even claim protection from destructive surges. Yes, that sentence is correct; read it again.
Surge protection is provided by earth ground. A protector either connects a surge harmlessly to earth. Or it put the surge on every wire - gives the surge more paths to find earth. Why are only a few appliances harmed? All appliances contain surge protection internally. But the rare and destructive surge will overwhelm that protection. You earth one 'whole house' protector so that protection in every appliance - even that router - is not overwhelmed.
Finally, did you know all telco and properly installed cable wires already have 'whole house' protection? Most do not - then use junk science reasoning to assume, "a surge entered on my phone line". In your case, it sounds like a surge you let into the house found earth ground destructively via the internet cable.
Surge protectors are only as effective as its earth ground (and no AC receptacle has an earth ground). That means every incoming wire inside every cable connects short (ie 'less than 10 feet') to single point earth ground. You provide that ground. Those protectors (including the AC mains 'whole house' protector you must install) will only be as effective as the earth ground you have installed.
You had damage because surge energy was not harmlessly earthed. UPS does nothing; does not even claim to provide protection you had wished for. You permitted a surge to hunt for earth ground destructively inside the building. Where do you want that energy to be absorbed? Inside the building? Or harmlessly in earth? The effective solution costs about $1 per protected appliance. How much for that UPS?