How reliable is copying files over the years?

November 13, 2026 5 answers
Asked by -unfold-at-your-leisure

An old video that has been copied between drives showed artifacts and skipped frames in one player, but looked fine in another. That makes me wonder whether the file is damaged or the player is having trouble decoding it.

Does Linux normally verify that a copied file matches the original? Both drives use ext4.

Answers

bRieflyInOrbit

Try the same sections in both players before blaming the copy. If one consistently plays them correctly, a decoder, hardware acceleration, or player setting could explain the difference. That is a useful clue, though it does not prove every byte of the file is intact.

If you still have an older copy, compare a hash of each file. Matching hashes give strong evidence that the copies are identical. Different hashes tell you they differ, but not which copy is good or when the change happened.

Reply to this answer
hitchhiker_without_luggage

Ordinary copying with cp or a file manager does not normally calculate a whole-file hash and compare the source with the destination afterward. The storage hardware and operating system do have mechanisms for detecting or correcting some errors, but that is not the same as an independent comparison of the finished files.

For a check, calculate a hash such as SHA-256 on both copies and compare the results. Keep the original until you have checked the destination. A match confirms the copy matches what was read from the source, not that the source was already free of damage.

Reply to this answer
THE LONG WAY INDOORS

Rsync has a distinction worth knowing about. It normally verifies transferred files as they are reconstructed on the receiving side. Its checksum option, rsync -c, changes how it decides whether existing files need transferring. It is not simply a switch that turns on the normal transfer verification.

That transfer check is not quite the same as reading both files back later and comparing hashes. A separate comparison can be useful when you want to check the files as they are stored afterward.

Reply to this answer
between-sips-and-sneezes

The filesystem matters too. Ext4 does not normally checksum regular file contents, so it cannot reliably detect silent changes to those contents. Btrfs normally checksums file data and can detect a mismatch when data is read or during a scrub. Whether it can repair the damage depends on having another good copy available.

Checksums are not a replacement for backups. They can help identify a problem, but you still need an intact copy to restore from.

Reply to this answer
PLASTIC FORK CONVENTION

Also make sure a copy has actually finished writing before disconnecting a drive. Data can sit in write caches, so a premature unplug or power loss can leave an incomplete file. Safely unmount the drive and wait for that to finish.

If you do find mismatched files or read errors, preserve any other copies before doing more troubleshooting. A bad drive is one possibility, but the playback symptoms alone do not establish that.

Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions