how long (order of magnitude)
In order of magnitudes: 100 years!
- one and 10 years can be ruled out, because I've used plenty of CDs that are older. Are we larger than 50 years? Yeah, probably. There's certainly some still-partially-readable cassette tapes from 1972. Not to mention vinyl long play disks. Or microfiche. Or… the number of potential examples of machine-readable storage media is staggering.
- 1000 years is unrealistic outside of an archeology context, as "reading out" will turn out to be an exercise in understanding primitive approaches to information processing
So, as Fermi estimate, 100 years is the safe bet. If we allow for archaeology-grade effort in retrieval, things look different:
but with access to "consumer grade" memory storage and modern error
correction algorithms,
The most important error correction algorithm is still having multiple copies (repetition coding) and using the one without errors. Another state-of-the-art reliability-enhancing technology is using diversity, so that the things that affect multiple copies of the same information are different, so that a total loss of information becomes less likely.
So, put your info on $N$ archival-grade hard drives (these are consumer-grade), good USB flash memory, BluRays, good SSDs, and put them in $N$ different places. In 100 years, dig them up, and see what you can piece together.
This seems like a statistical error correction problem, I imagine the
math is similar to recovering a signal from N redundant digital
(binary) streams with noise of similar, but probably biased
distributions (varying with storage medium).
It is the same problem, but it does incorporate the fact that the errors aren't uncorrelated. For example, if one hard drive fails often, then other hard drives of the same model are likely to have the same problem.
What I'm really trying to get it is how many hard drives I would need,
assuming none fail outright, to preserve my data for a lifetime or
ten.
Can't tell you. You need to read the hard drive spec sheets, they actually do state mean life times. And then do some modelling on that; for example, assume exponential failure rate (that's a simplistic, but relatively common model for failure rates) that lead to that mean life time, set a probability with which you want to be able to retrieve the data in ten lifetimes, define how long a life time is.
Also, look at non-consumer-grade storage. What sense does it make to buy $N$ cheap hard drives if, say, $\sqrt[5]{N}$ backup tapes and a reader for these would have done the same reliability? It's not like your ancestors will go and be like "a potentially partially damaged hard drive from 900 years ago! How handy, I can totally directly plug this into my PC, which for religious reasons still is a box under my desk, and for inexplicable reason still uses a SATA storage interface". Long-time archival is not in any way an optimization objective of consumer-grade storage, so it's unlikely consumer-grade storage is the cheapest way to achieve that.
I don't think its possible to store information indefinitely because
entropy always wins in the end...
Indefinitely is also not relevant, seeing that the sun will end up swallowing the earth, and if civilization manages to leave this star system, then it will definitely not take a bunch of old hard drives with them. If anything, they will collect the data from these ancient hard drives and get rid of the original medium.
Here, the same problem as highlighted above with your "ten lifetimes" arises: Once you get into modelling of things with long timespans, low probabilities and exponents in their distributions, being handwavy about your requirements can quickly make orders of magnitude in difference. "A life time" might well be doable with a single copy on a long-term optimized storage medium. "Ten life times", is that 600 years or 1200 years, incorporating assumptions about the future of humanity and civilization? This might make the difference between, say, 20 copies and 1,000 copies, as well. So, sit down, do the hard, engineering part of writing down specs, collecting datasheet data from the storage media that you have access to. No shortcuts there.