Good question. As far as I'm aware, outside of a few special circumstances (like birth records), the vast majority of legal record preservation requirements are seven years with some being as long as ten years. Of course, with the service life of some military ships and aircraft now being stretched >30-40 years, I can imagine it might be useful to have records of component failures and replacements, especially for statistical modeling.
In the case of a ship (or sub), I'd assume that they'd rotate optical media archives off the vessel every year or two and transfer them to some central database. After all, a vessel can be lost and the data is also useful in the aggregate.
> outside of a few special circumstances (like birth records)
Also IIRC several US states require medical record retention for minors of up to one year past whenever they become adults, so that's a potential 19 years there.
In the case of a ship (or sub), I'd assume that they'd rotate optical media archives off the vessel every year or two and transfer them to some central database. After all, a vessel can be lost and the data is also useful in the aggregate.