Backup Verification in 2026: Exit Code 0 Is Not a Backup
Backup Verification in 2026: Exit Code 0 Is Not a Backup A story made the rounds in a DevOps community recently, and it should make anyone who owns a cron job uncomfortable. An engineer checked on a backup script that had been running perfectly by every visible measure — green in the scheduler, exit code 0, night after night — and found it had been "succeeding" at backing up nothing at all for…
A recent story has gone viral within the DevOps community regarding a seemingly flawless backup script that had actually not been performing its core function for three weeks straight. An engineer discovered this unsettling truth when the script, which had been running without issue and displaying a clean exit code of 0 every night, was found to be producing no backups at all during this period.
This incident highlights the critical importance of verifying backups, as exit code 0 does not guarantee the existence or integrity of the backup.
The narrative underscores that there are four levels of confidence when it comes to backups: (1) the artifact exists, (2) it is structurally intact, (3) it can be accessed and read, and (4) it has been successfully restored and the data validated. Many teams typically only verify the first level, which is a significant oversight. The article emphasizes that a comprehensive backup verification process should include multiple checkpoints, such as checksums, restoration drills, and scheduled verifications.
The article suggests a verification ladder to ensure backup reliability. Level 1 focuses on confirming the existence and freshness of the backup, which is typically done through monitoring the job's success. Level 2 involves checking the structural integrity of the backup, such as verifying checksums and running tool-specific integrity checks.
Level 3 is about confirming that the backup can be read and opened, ensuring that the backup format is correct and the data matches expectations. Level 4 is the most crucial and involves restoring the backup into a test environment to validate the data and confirm that it can be recovered. This level is the only one that truly verifies the ability to perform a successful recovery in case of a failure.
The article stresses that merely seeing a backup job exit with code 0 is not sufficient to trust that a backup has been created. It is essential to implement a robust verification process that includes multiple levels of checks, ranging from simple existence checks to full restore and data validation. By following this verification ladder, teams can ensure that their backups are trustworthy and that they can recover their data when it is most needed.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.