There was a 1950s novel where a rogue pair of planets enters our solar system, smash Earth, and the survivors have to jump to the new world that happens to have domed cities left over by THAT world’s former survivors.
left over by THAT worlds former occupants.............