Not going to be cheap. Normally you use a generator for more than a couple minutes. If you use a laptop then maybe the internal battery would run that long and you could use a UPS for just the modem.
So first thing is to get the watts your pc and other equipment actually uses. Something like a killawatt meter would tell you but you could just use worst case and look at the watt rating on the equipment.
Next comes the math part. If we pretend we can convert battery power to AC power with no loss you can estimate what your best case would be.
Most batteries are 12 volts. They are rated in AMP hours. So a very common ups battery is 9amp hours. This means it can put out 12x9...108 watts of power for 1 hour. If you need 1000 watts of power you would need 10 of these batteries to last just one hour.
If you really want to go the route of a just a UPS rather than a UPS that can run long enough for you to run out and start your generator I would look at solar battery banks and charge them with city power rather than solar panels.
To run say 1000 watts of equipment for 6 hours you would need about 500 amp hours of 12 volt batteries....again ignoring reality and assuming no loss going from 12 volts dc to 120 volts ac.