Corruption is a state of a file, a filesystem, etc. where all its data and metadata are not consistent. This tag may be used to reference questions dealing with problems of data recovery after erroneous manipulations or unexpected shutdown.


Corruption can be defined as the non-preservation of the integrity of a data container. Corruption can cause a wide range of problem starting from data loss to the impossibility to boot a system.

Some systems (filesystems, programs, etc.) are designed to resist to some level of corruption in their internal data or configuration. They are said to be resilient.


File systems are subject to corruption because they cache data to memory instead of writing it directly to the disk. If the data is not entirely written to disk at the time the system is brutally shut down (due to power loss, for example), there is a risk of inconsistency in the file system.


Newer file systems are designed to resist to the corruption. They usually use a journalling mechanism which help tracing the modifications of the filesystem and prevent corruption to appear. In other area, such as communication over unreliable channel, detection or correction codes can be used to detect or correct corruption of messages during transfer.