← Back to all guides
Guide

Verify Export Files With SHA-256: Bit-Rot Checks

Updated Sep 30, 2026

Three copies of an export is the 3-2-1 rule. It does not help if all three copies are silently corrupted in the same way. Bit rot is rare on SSDs and uncommon on hard drives, but it happens. The only protection is to verify your files periodically. This guide shows how, on macOS, Windows and Linux, and how often to actually run it.

Why bit rot is worth caring about

Most drive failures are loud: the disk clicks, the SSD disappears, the file refuses to open. Bit rot is the opposite. The drive still mounts. The file still opens. Bytes somewhere inside have flipped silently, and your archive is now subtly wrong.

For most files this does not matter. The OpenDocument file you keep "just in case" tolerates a few flipped bits; you would re-download it.

For an export you took once and may need in five years, it matters. The fitness data you have been saving since 2018, the photo library you are about to back up, the AI conversations you want to keep for the long term. These are the files where silent corruption costs you the only copy.

  • Catastrophic failures are recoverable; bit rot usually is not, until you notice it
  • Modern drives are reliable but not infallible. The Backblaze hard drive reports show annualised failure rates that are low but not zero
  • The archives you actually care about are the ones where this matters. Casual backups do not need it

What SHA-256 actually is

SHA-256 is a cryptographic hash function. You feed it a file of any size; it produces a 64-character string of hex. The same file always produces the same string. A single flipped byte produces a completely different string. There is no known way to construct two files with the same SHA-256.

For verification purposes, this means: keep the string. If the file you have today produces the same string, it is bit-identical to the file you hashed.

  • SHA-256 beats MD5: MD5 is fast and widespread but collision-prone. Use SHA-256
  • SHA-256 beats SHA-1: SHA-1 has known collision attacks. Use SHA-256
  • BLAKE3 is faster than SHA-256 and supported in some tools. SHA-256 is what every OS ships by default. Stick with SHA-256 unless you have a reason

Generate checksums on macOS

macOS ships with `shasum`. Use the `-a 256` flag to select SHA-256.

  • Hash one file: `shasum -a 256 path/to/file.zip`
  • Hash every file in a folder and write to a manifest: `find /path/to/folder -type f -exec shasum -a 256 {} ; > manifest.sha256`
  • Verify later: `shasum -a 256 -c manifest.sha256` (run from the folder holding the manifest)

Generate checksums on Windows

PowerShell is the modern path. The older `certutil` also works for one-off hashes.

  • PowerShell, one file: `Get-FileHash -Algorithm SHA256 path o ile.zip`
  • PowerShell, one folder, written to manifest: `Get-ChildItem -Recurse | Get-FileHash -Algorithm SHA256 | Export-Csv manifest.csv`
  • cmd, one file: `certutil -hashfile path o ile.zip SHA256` (one file at a time, no built-in manifest)

Generate checksums on Linux

Linux ships with `sha256sum`. Same shape as macOS.

  • Hash one file: `sha256sum path/to/file.zip`
  • Hash a folder recursively: `find /path/to/folder -type f -exec sha256sum {} ; > manifest.sha256`
  • Verify later: `sha256sum -c manifest.sha256`

Store the manifest somewhere that is not the disk you are verifying

The whole point of a checksum is to detect corruption. If the manifest sits on the same disk as the files you are hashing, it cannot tell you the disk has rotted. Put it somewhere else: a USB stick, an encrypted cloud drive, a paper printout in a drawer. Two copies is fine. The manifest needs to outlive the disk.

  • manifest.sha256 in the export folder, plus a copy on a second medium
  • For long-term archives, print the manifest and store the paper somewhere dry. Paper does not rot quietly
  • For huge archives, hash by directory rather than by file. Faster to verify, slightly less granular if corruption does occur

Verify a manifest later

All three OSes can re-hash a manifest and report which files changed. Run it once a year, on the same schedule as your exports.

  • macOS / Linux: `shasum -a 256 -c manifest.sha256` (run from the folder containing the manifest)
  • PowerShell: pipe the manifest through Get-FileHash line by line and compare to the recorded hash. There is no built-in `-c` equivalent; sample script in the verify section below
  • Output prints the filename and `OK` for files that match. A mismatch prints the filename and `FAILED`
  • If a file fails: try a fresh copy from another backup. If two backups fail the same way, the original was bad. Re-export

PowerShell verify script

PowerShell does not have a built-in `-c` equivalent to `sha256sum -c`. The pattern below reads a sha256sum-format manifest, re-hashes each file, and prints any that changed.

  • Save this as `verify.ps1` in the manifest folder:
  • ```
  • Get-Content manifest.sha256 | ForEach-Object {
  • if ($_ -match '^([a-f0-9]{64})s+*(.+)
    #39;) {
  • $expected = $matches[1]; $path = $matches[2]
  • $actual = (Get-FileHash -Algorithm SHA256 -Path $path).Hash
  • if ($actual -ne $expected) { "CHANGED: $path" }
  • }
  • }
  • ```
  • Run with `powershell -ExecutionPolicy Bypass -File verify.ps1`

How often to run it

Right after you take the export: the platform can produce a bad archive, and verifying catches it before you delete the original. Then once a year, on the same cadence as the export itself. Digital Takeout Day is May 8 and November 8. Run the verify on one of those.

  • Immediately after every export: catches a platform bug before you delete the source
  • Annually, on Takeout Day: matches the export cadence
  • Every time you move archives to a new drive: bit rot often happens during copy

When SHA-256 is the wrong tool

SHA-256 verifies files you already have. It does not protect against ransomware, drive theft, fire, or a domain going dark. For those, you need offsite copies and ideally a backup tool with built-in integrity.

  • BorgBackup and restic do whole-archive integrity checks on every read. If you are already scripting backups, switch to one of these
  • ZFS and btrfs have per-block checksums that catch bit rot the moment a block is read. If you are setting up a homelab NAS, the second option is the right reason to choose one of these filesystems
  • The backup guide covers the storage architecture. This guide is the integrity layer on top

Related guides

FAQ

How long does SHA-256 take on a 1TB export?

On a modern SSD, a single 1TB file hashes at roughly 500 MB/s to 1 GB/s. A 1TB archive of many small files is dominated by I/O and can take much longer. Expect somewhere between 30 minutes and a few hours for 1TB.

Should I check every file individually?

You can hash by directory and still catch corruption. The smaller the granularity, the easier it is to identify the corrupted file when something fails. For archives you care about, hash every file. For casual backups, a per-directory hash is fine.

What do I do if a checksum fails?

Compare against another backup. If only one copy is bad, replace it from a clean one. If two copies fail the same way, the original was bad and you need to re-export from the platform.

Does SHA-256 protect against ransomware?

No. SHA-256 detects silent corruption. It does not detect that an attacker, or a bug, replaced your file with something else. For ransomware, you need an offsite immutable copy.

Is there a GUI tool?

On macOS, Checksum Mosh and HashCheck are common picks. On Windows, HashCheck is the standard free option. On Linux, the command line is usually faster than any GUI.

About the author

Charles runs Digital Takeout Day, a twice-yearly reminder (May 8 and November 8) to download and back up your data from every online service you use.

Every guide is cross-checked against the platform's own export documentation and re-verified before each Takeout Day.

Read the full bio, editorial policy, and contact →