Why is doomsday so fun to think about? Maybe it fulfills the same role as the frontier once did: to allow us to envision a new world that we can shape from scratch. The world sometimes seems so messed-up, and individuals so powerless, that a hard reboot can start to seem downright attractive. If we're lucky, zombies, walking plants, desert car races, and numerological puzzles involving 666 would distract us from the mundane reality of hardscrabble farming and discovering that the meat you just ate wasn't really albatross. How would we prepare? What would we have to do to reboot civilization? It is a fascinating intellectual exercise.
In recent days we've heard Stephen Hawking's much-quoted remark that human survival ultimately requires leaving Earth -- which is undoubtedly true, although "ultimately" means hundreds of millions of years. There are also plans afoot to build libraries and gene banks in the Arctic and on the moon. I have a soft spot in my heart for underground vaults and moonbases, but these projects are based on a seriously flawed view of what a postapocalyptic world would be like. In the information age, we tend to focus on explicit knowledge of the sort stored on hard drives and in books. But science, medicine, and engineering are, in underappreciated ways, oral traditions. They depend on skills being handed down from person to person, in a way that book-reading (as important as it is) cannot replace. Our technological civilization depends hugely on the specialization that a large population allows. It also depends on the accumulation of capital, a process that unavoidably takes time. Economist William Hodges discussed this in a chapter of the book Interstellar Migration and the Human Experience.
So the lunar library wouldn't be enough. Consumed by survival needs, the first generation may not even teach the next to read. Once that chain of literacy was broken, people would have to reinvent written language and then try to decipher the ancient script. Even when they could access the answers in books, they would might not know what questions to ask, having no experience of what life had been like. There is also the small problem that a book on how to build a transistor or splice a gene is of little use if your only tools are rock arrowheads.
This challenge is nicely illustrated by the plight of the humans in Battlestar Galactica, as I have mentioned on the Battlestar Galactica Wiki. Barely a year after being routed, the humans have exhausted their supplies of medicine, their spaceships are barely flightworthy, and they are bitterly, even murderously, divided among themselves. Reduced in numbers to 50,000, they have to develop agriculture, industry, and infrastructure almost from scratch. If anything, I think they should be glad their Cylon adversaries have returned. Without them, they would have been doomed to thousands of years of painstaking rebuilding, in which things would first have gotten a whole lot worse.