Get the full Backup Integrity Drift Watch — $49 one-time
Free guide

The backup folder checklist: seven checks that catch a broken backup before a restore does

Most teams do not have a backup problem. They have a verification problem: a job runs every night, exits 0, and writes something to disk, so the dashboard is green. The failure only becomes visible when somebody needs the data back — which is the worst possible moment to learn that last Tuesday's archive is 2 KB of nothing.

This checklist is the manual version of what a backup assurance job should do every day. It takes about five minutes on a folder you already have. Run each step against a copy or read-only mount, never against the live job's output directory.

Throughout, assume the folder is named BACKUP_DIR and the job writes one file per day.

export BACKUP_DIR=/srv/backups

1. Freshness: is the newest file actually new?

Do not trust the exit code of the job. Check the modification time of what it produced.

find "$BACKUP_DIR" -type f -printf '%TY-%Tm-%Td %TH:%TM  %10s  %p\n' \
  | sort | tail -5

If the newest file is older than one schedule period plus a margin, the job is late or has stopped. Two traps:

2. Size floor: compare against the file's own history, not a fixed number

A minimum of "1 byte" only catches empty files. A realistic floor is a fraction of the median size of the last successful runs for that path.

find "$BACKUP_DIR" -type f -name '*.zip' -printf '%s %p\n' | sort -n | head -3

A single outlier at the bottom of that list is the classic silent failure: the dump was truncated, the database connection dropped mid-export, or the job wrote an error page where a stream should be. Flag anything below roughly 25–50% of the trailing median. Do not compare a full backup to an incremental one; they are different populations.

3. Content drift: keep a baseline of size plus a content hash

Existence and freshness both pass for a file that has changed when it should not have. Schema migrations, a wrong table list, a misconfigured --exclude, or a partial restore into the source directory all produce a valid, fresh, wrong archive.

Store, per relative path: size and one content hash. Compare on every run.

# any content hash you have; b3sum and md5sum are as valid as anything else here
b3sum "$BACKUP_DIR/db-2026-12-03.sql.gz" > /var/lib/backup-baseline/db-2026-12-03.sql.gz.hash

What to expect:

4. Archive structure: the file is not the data

A file can exist, be the right size, have the right hash, and still be unopenable. Test the structure, cheaply and read-only:

unzip -t "$BACKUP_DIR/daily-2026-12-04.zip"          # CRC over every member
gzip -t "$BACKUP_DIR/db-2026-12-04.sql.gz"           # one full decompress pass
tar -tzf "$BACKUP_DIR/files-2026-12-04.tar.gz" >/dev/null

For a SQLite database, the header and page arithmetic are worth checking before you open it:

sqlite3 "$BACKUP_DIR/app-2026-12-04.db" 'PRAGMA quick_check;'

quick_check is cheaper than integrity_check and still catches page corruption, truncated files and a missing header. Skip .sqlite files that are still being written — a header test on a database mid-transaction tells you nothing useful.

Set a cap on how much you decompress in one pass. A 900 GB tarball or a decompression bomb will otherwise turn your daily check into an outage of its own. A few hundred megabytes, or a member count limit, is usually enough to know whether the stream is sound.

5. Missing files: a deletion is a drift, not a cleanup

"The file is gone" is the most alarming result and the easiest to miss, because most scripts only iterate over files that exist. Maintain the list of paths you expect and diff against it:

comm -23 <(sort /var/lib/backup-baseline/expected.txt) \
         <(cd "$BACKUP_DIR" && find . -type f | sed 's|^\./||' | sort)

Anything in the left column is a file that used to exist and no longer does. Two legitimate explanations: retention deleted it on purpose, or the job was moved to another volume. Both should be a deliberate change to the expected list, made by a human, not an accident discovered weeks later.

6. A restore test, on a schedule, not on principle

Structure tests prove the container is readable. They do not prove that the data inside is complete or that the restore procedure works. Once a quarter, restore the newest archive into a scratch environment, start the application against it, and count rows in three tables you care about. Record the date and the result. If nobody has done this in the last 90 days, your real recovery time objective is unknown.

7. Alert on changes, not on every run

A daily job that emails "all good" trains people to ignore it. The useful signal is a transition: ok → late, ok → missing, ok → changed, ok → corrupt. Send those to the channel the on-call person actually reads, include the relative path and the short reason, and stay silent otherwise. Keep the history so you can answer "when did this start?" — a single snapshot cannot.

Failure modes this catches

What you seeLikely causeFirst move
Newest file is 3 days old, job exit code 0Cron entry lost, or the job is silently skippedCheck the scheduler and the job log
File is 2 KB where 400 MB is normalTruncated dump, dropped connection, error text written to the archiveRe-run the export, check the source database
Fresh file, small size, passes unzip -tEmpty or partial exportCompare table counts against the source
Correct size, unzip -t failsDisk error or a copy interrupted mid-writeRe-run and check the destination disk
One file vanishedRetention change, or a deleted volumeDecide whether it is expected; update the expected list
Changes every night, nobody knows whyWrong table list, exclude pattern, or recompressionDiff the archive contents, not just the bytes

Where the manual version breaks down

Every step above is a script. The problem is not writing the first one — it is owning it forever: state that survives the shell session, a schedule that runs whether or not anyone is logged in, thresholds per folder, a history table, change-only alerting, and an API for the rest of your tooling. That is a small service, and most teams end up maintaining a fragile one they never wanted.

Backup Integrity Drift Watch is that service, packaged as one Docker container you host yourself: it mounts the backup folder read-only, runs the freshness, size, baseline, archive and missing-file checks on a schedule, keeps 90 days of history in SQLite, posts to your webhook only when a status changes, and exposes /api/backups for polling. Backup contents never leave your server; only metadata is stored. The full package includes the complete source, a setup.sh that configures it in one command, and a doctor command that prints what is wrong and how to fix it.

Want this done for you?

Backup Integrity Drift Watch checks your backup files every day for missing, late, undersized, changed and corrupt copies, and alerts you the moment a result changes — so a restore emergency never discovers a broken backup first.

Get the full Backup Integrity Drift Watch — $49 one-time See how it works

More free guides

Free to share · cookieless, privacy-friendly analytics