Linux · Command Line

    rsync --checksum vs a Manifest: Do Your Files Really Match?

    rsync is brilliant at copying and surprisingly weak at proving. Here's what the default actually checks, what --checksum changes, and when you want a SHA-256 manifest instead of trusting the transfer.

    Published June 30, 20269 min read
    Mehrab Ali

    Author

    Mehrab Ali

    Data Scientist, Researcher & Entrepreneur

    Founder of ARCED Foundation, ARCED International, and Solutions of Things Lab (SoTLab). Built FolderManifest to help teams protect file integrity and stay audit-ready.

    Quick answer

    By default rsync decides what to copy from size and modification time, not file contents — so silent corruption with an unchanged size and timestamp can slip through. rsync --checksum (-c) forces a full content comparison (using MD5). To prove two trees match without copying, use rsync -avc --dry-run src/ dst/. To prove a tree is intact over time, against a fixed SHA-256 baseline, use a manifest.

    • Default rsync trusts size + mtime — fast, but it can miss corruption.
    • -c reads every byte and compares checksums (MD5).
    • -avc --dry-run lists what differs without touching anything.
    • A manifest adds a dated SHA-256 baseline you can re-verify later.

    rsync's default trap

    rsync's speed comes from a shortcut: for each file, it compares the size and modification time on both sides. If they match, rsync assumes the file is identical and skips it. That assumption is right almost always — and wrong exactly when it matters most. A file that was corrupted in place (a bad sector, a half-finished write, a tampered byte) can keep the same size and mtime, and rsync will happily leave the bad copy alone.

    For everyday mirroring that's a fine trade. For "I need to be sure this copy is correct," the default isn't a verification — it's an optimistic guess.

    What --checksum changes

    Adding -c / --checksum tells rsync to stop trusting metadata and compute a checksum of every file on both sides, comparing those instead:

    Terminal
    # force a full content comparison (slower, but honest)
    rsync -avc /data/source/ /backup/dest/

    Now corruption is caught regardless of size and timestamp. The cost is speed: rsync has to read every byte on both ends. Modern rsync uses MD5 for this checksum — fine for catching accidental corruption, but worth knowing if your threat model includes deliberate tampering (where MD5 is the wrong choice).

    Compare two trees without copying

    One genuinely useful pattern: use checksum mode plus --dry-run as a read-only "do these two folders actually match?" check. rsync lists the files that differ and transfers nothing:

    Terminal
    rsync -avc --dry-run /data/source/ /backup/dest/
    
    sending incremental file list
    reports/q3.xlsx
    config/app.yml
    
    # empty list = the trees match; any names = files that differ

    It's a quick, dependency-free way to confirm a copy landed correctly — as long as you still have both trees on hand to compare.

    Where rsync stops short of verification

    rsync is a synchronization tool, and that shapes what it can and can't tell you:

    Questionrsync -cSHA-256 manifest
    Do these two trees match right now?Yes (MD5)Yes (SHA-256)
    Is this tree unchanged since last month?Needs the old treeYes — against the baseline
    Were files added to the destination?Only with --deleteFlagged as drift
    Tamper-evident (SHA-256)?MD5 onlyYes
    A dated record to show an auditor?No artifactSaved manifest + report

    The pattern rsync can't express is "prove this folder is exactly as I left it" — because it always needs a second tree to compare against, and it produces no durable record of the check.

    When to reach for a manifest

    A manifest flips the model: instead of comparing two live trees, you capture a SHA-256 fingerprint of one tree once, then check reality against that fixed baseline whenever you want. The FolderManifest CLI does this on Linux and Windows:

    Terminal
    # fingerprint the source when it's known-good
    foldermanifest generate /data/source --format json --out source-baseline
    
    # later — verify the backup against that baseline (no source tree needed)
    foldermanifest verify /backup/dest --manifest source-baseline.json
    echo "exit: $?"   # 0 = matches, 1 = added/removed/modified

    Because it compares against a stored snapshot, it catches additions and deletions, uses SHA-256, and leaves a dated report — none of which a transfer tool is built to do. The exit code drops into cron or CI directly.

    Use both — they're complementary

    This isn't rsync versus FolderManifest; it's copy versus prove. Let rsync move the bytes, then let a manifest certify them:

    Terminal
    rsync -a /data/source/ /backup/dest/                       # move the data
    foldermanifest verify /backup/dest --manifest source-baseline.json  # prove it landed intact

    rsync gets the files there efficiently; the manifest gives you a SHA-256, audit-ready answer to "did it land intact, and has it stayed that way?" To run that check on a schedule, see automating folder verification, and for the basics of sha256sum on Linux.

    Copy with rsync, prove with a manifest

    The FolderManifest CLI ships inside the desktop app on Linux and Windows — included with the 7-day trial and every lifetime license. Verify against a fixed SHA-256 baseline, no second tree required.

    Frequently asked questions

    Does rsync verify that files copied correctly?
    By default, no. Standard rsync decides what to copy by comparing size and modification time, not file contents. A file that was silently corrupted but kept the same size and timestamp can be skipped. Add --checksum (-c) to force a full content comparison, or verify the destination separately against a checksum manifest.
    What does rsync --checksum (-c) actually do?
    It tells rsync to compute a checksum of every file on both sides and compare those, instead of trusting size and mtime. Modern rsync uses MD5 for this. It is slower because it reads every byte, but it catches content differences that the default quick check misses.
    How do I check whether two folders match without copying anything?
    Run rsync in dry-run checksum mode: rsync -avc --dry-run src/ dst/. It lists the files that differ by checksum without transferring anything. An empty list means the trees match; any output is a file that differs.
    Is rsync --checksum the same as verifying file integrity?
    Not quite. rsync --checksum confirms that a source and a destination currently match, using MD5, with both trees present. It does not give you a fixed, dated baseline you can re-check later, it does not use SHA-256, and it is built to make the destination match the source rather than to prove a tree is unchanged over time. For that, generate a checksum manifest and verify against it.
    Does rsync detect extra files added to the destination?
    Not unless you add --delete, and even then it removes them rather than reporting them. A plain rsync only cares about getting source files onto the destination; extra files already in the destination are ignored. A folder manifest, by contrast, flags added files as drift.
    Why use SHA-256 instead of rsync's MD5 for verification?
    MD5 is fast but cryptographically broken — a malicious file can be crafted to match a given MD5. For tamper-evident verification, especially of untrusted or compliance-relevant data, SHA-256 is the safe default. rsync uses MD5 internally for speed; a manifest tool lets you verify with SHA-256.
    How do I verify a backup is intact long after the copy?
    Generate a SHA-256 manifest of the source when you know it is good, store it alongside the backup, and run verify against the backup whenever you want assurance. It exits 0 when the backup matches the manifest and 1 when any file was added, removed, or modified — no need to keep the original tree around for comparison.

    Related: sha256sum on Linux · Automate folder verification · Detect what changed in a folder