In these dark times (pun intended), this is an ongoing argument. The article link below goes to the trouble of doing the math based on initial outlay and running costs of a generator. The one exclusion on the generator was the cost of servicing the unit every 100 hours at another R1000 a pop! Then there’s that noise pollution.
There are pros and cons to each. Households and businesses especially that have already taken the plunge can still make use of solar systems that tie into the generator and have the best of all worlds, at a cost!
The smaller generators in this trial are not auto changeover type but manual, solar systems are seamless but a few stolen cables and some cloudy days also has its effect. Then a combination of the two work really well.
If you want to get completely off grid, you will need both but a look at the long term amortisation, the solar system should move ahead as it ages eventually providing cheap electricity, the price of fuel and maintenance on a generator will keep increasing.
They both have their place, it is really a matter of what is affordable in the short and long term and what will work for you.
https://mybroadband.co.za/news/energy/449884-how-much-it-costs-to-run-a-generator-vs-buying-a-battery-backup.html?utm_source=newsletter