I installed solar (10kW} & batteries (30kWh) this past year (largely DIY - hired a trencher and pestered an electrician here and there). The batteries I went with are the Enphase ones; they're more pricey per kwh than the Tesla, but I didn't have to pay someone to install them, plus they're more serviceable (each of 4 microinverters per battery unit can die with only partial power loss, trivial to replace), and finally, they're actually available (I initially had spec'd 20kWh and decided after installing the 20 to add another 10, had the unit delivered in a week).
My system can charge batteries from solar or grid, and it has a variety of operating modes such as full backup (use battery power only if grid is down) or "saving mode", where battery power is used during the peak electric price time period and is recharged later (when power is cheapest, or from solar).
The funny thing is we don't know when the utility grid goes down any more, until we look across the valley and don't see lights on in the house across the way - or we hear generators running off in the distance.
The Enphase switch ("Enpower") has connections to attach a backup generator as well, though they haven't released the feature yet. Considering we've had PSPS events (blackouts to prevent another power line from burning down another city) last a few days, I'd consider getting a generator that would occasionally run to recharge batteries, especially useful for hot summer (A/C) or dark winter (lousy solar) outages.