Check the mAh (milliamp/hour) rating on the UPS (uninterruptible power supply) and then compare it with the equipment you want it to run - if the UPS is rated 200mAh and your equipment is running 50mA then you've got 4 hours supply.
Trying to upgrade the battery in a UPS won't work so well, first a bigger battery would require a higher charging capacity than the UPS is designed for, that may only mean it takes longer to charge, but it could also mean that it never charges fully, also, most UPS' these days have 'smart circuitry' that would probably detect the higher current of the bigger battery and simply see that as a fault and cut the thing off altogether.
Definitely worth investing in a UPS though if you're in an area that experiences power outages. Look for the 'dumbest' UPS you can find - no bells and whistles, no PC interface etc (some require some sort of 'communication' with the PC they are powering).