I hope I won't spoil it (it is a book saga from decades ago) but that is a major plot point of Shannara cycle.
Seveneves would come close. Spoiler alert, it features three groups of people surviving apocalyptic conditions on our planet in space, in deep sea, and in under mines. Part 3 is where the last two groups are introduced.