I did the math on a 8.6kW PV + 1 Powerwall 2 vs 11kW standby whole home generator. Between electricity offsets and production incentives the PV will pay itself off in about 9 years. When I then compared just the Powerwall vs the standby generator the Powerwall came in at $12,221 and the generator came in at $12,184. That may sound close but the Powerwall had a 30% federal ITC making it actually $8,554.70 and the generator quote did not include the gas piping, which was estimated at about $2,000 + tax. I also looked in to getting a portable generator which, to your point, was much more cost effective.
The net comparison was:
Powerwall @ $8,500 net outlay
+ Provides backup protection 100% off grid, including natural gas "grid".
+ No regular maintenance
+ Running while the grid is down is free
+ Instant switchover during an outage
o Unlimited runtime during the summer, limited runtime during the winter
- Not be able to back up everything
Generator @ $14,500 net outlay
+ Provides whole home backup protection
o Unlimited runtime while fuel is available
- Takes a minute to switch over during an outage
- If natural gas is unavailable, generator doesn't work (ie long term power outage, earthquake, etc)
- Costs $1/hr to run, $250/year to maintain
I went Powerwall