Inverter would be the best here, but there are a few other things you will need to buy for an inverter system to work. 1. Inverter itself, and you will need to check how much power you will need in Watts when considering the size 2.And then you need a battery which will depend on the inverter size, make sure you get a proper one too not those cheap ones.. 3 Solar panel again the size depends on your battery size.... Just do your research before you buy, check on the internet how to add up your power requirements.
If your area has zesa, you do not need solar panel you can just get an inverter that can handle electric charging.
UPS is short term maybe 2-3 hours so if you face an all day outage you are screwed...
Anyway i have 600W invertor $165, not sure about battery size i think it a 600W too $230 and i do not have a solar panel because the inverter can also charge using Zesa... I have had this system since April and i can tell you with almost daily use its a good investment, i plug in a fan, flat screen 42'', decoder, dvd,and charge my phone(s) it will run for 7-9 hours depending on use..