In a lot of instances data corruption accurs in 3 ways,
User fault, Hardware fault, and software fault
Software fault can be further divided into accidental or intentional
Accidental is often update errors and intentional is malware, viruses and spyware.
User fault is rare but it does happen: saving something in the wrong format, undirected download and such.
Completely unintentional but it does happen.
Hardware faults are the middle,
In the example of spinning rust actual thinning in the oxide coating on the platter fails to retain the magnetic charge, jarring the drive causing head crash, or read write head failure.
All these are usually indicated by the operating system software.
Ssd media: failure of its internal battery near the end of its useable life, inadvertant voltage spike during write cycles can burn the memory address rendering it unusable.
(Bad mem location fault)
Again os software usually detects the bad blocks and reads/ writes around them.
The best defense?
The best defense is, has been, and always will be
Timely and verified back up of your data.
If you are not using a program or file regularly, back it up, archive it, and keep detailed legend of the archive for fast and easy retrieval.
That being said its a matter of the data importance that determines the need for
extensively protecting and maintaining it.
As secretary for the fire department its my job to maintain all records.
So far digitally these records go back to 2000
But we are in the process of digitizing about 100 years worth of history and properly archiving it
So yes this is very important data to us and our community.
How important is your data to you?
How you save the data makes a lot of difference.
As programs evolve old formats tend to be left in the dust.
And you have files that require special software just to access them.
For example an os or program will store files in their native formats and extensions.
Another os or even updated program may not even be able to read them unless its backwards compatible.
Archiving purposes: save as plain text or include a copy of the old program in the archive whenever the upgrade forces you to.
I know this sounds extreme but its a fact of life too many people forget or take for granted.