Don't know what your budget is and if you would rather spend more money instead of many man hours. This suggestion requires little or no circuit re-wiring.
Install a battery system, solar system, and an AC Pass Through (hybrid) Inverter/Charger. This will do the following:
1. On shore power or generator the Inverter/Charger will supply your AC needs and also charge your batteries and supply any DC needs.
2. When no external AC is available the inverter/charger will supply your AC needs and the solar system will re-charge your batteries. DC loads are also provided for.
This is an over simplified explanation, suggest you contact AMSolar and discuss with them. URL is:
https://amsolar.com/
Pat