To choose the right size of ups, you need to know at least:
power consumption of the printer in sleep mode,
maximum power consumption of the printer during self-maintenance,
duration of self-maintenance,
average duration of power failure in your area or minimum time you want the ups to supply...