Is there such thing as a transfer switch to feed two independent power
Most generators use these it''s what allows the circuit to switch from city power to generator power on city power loss. Drop in a ups and a transfer switch and you would be good to go.