| name | validating-backup-integrity-for-recovery |
| description | Validate backup integrity through cryptographic hash verification, automated restore testing, corruption detection, and recoverability checks to ensure backups are reliable for disaster recovery and ransomware response scenarios. |
| domain | cybersecurity |
| subdomain | incident-response |
| tags | ["incident-response","backup","integrity","hash-verification","restore-testing","disaster-recovery"] |
| version | 1.0 |
| author | mahipal |
| license | Apache-2.0 |
| nist_csf | ["RS.MA-01","RS.MA-02","RS.AN-03","RC.RP-01"] |
Validating Backup Integrity for Recovery
When to Use
Use this skill when:
- Verifying backup integrity before relying on backups for ransomware recovery
- Building automated backup validation pipelines that run after each backup job
- Auditing backup infrastructure to confirm recoverability for compliance (SOC 2, ISO 27001, NIST CSF RC.RP-03)
- Detecting silent data corruption (bit rot) in backup storage before a disaster occurs
- Validating that immutable or air-gapped backups have not been tampered with
Do not use for initial backup configuration or scheduling. This skill focuses on post-backup validation.
Prerequisites
- Access to backup storage (local, NAS, S3, Azure Blob, GCS)
- Python 3.9+ with
hashlib (standard library)
- Backup manifests or baseline hash files for comparison
- Isolated restore environment for restore testing
- Backup tool CLI access (restic, borgbackup, rclone, or vendor-specific)
Workflow
Step 1: Generate Baseline Hash Manifest
Create a cryptographic fingerprint of every file at backup time:
find /data/production -type f -exec sha256sum {} \; > /manifests/prod_baseline_$(date +%Y%m%d).sha256
head -5 /manifests/prod_baseline_20260319.sha256
Step 2: Verify Backup Archive Integrity
Check that the backup archive itself is not corrupted:
restic -r s3:s3.amazonaws.com/backup-bucket check --read-data
borg check --verify-data /backup/repo::archive-2026-03-19
gzip -t backup_20260319.tar.gz && echo "Archive OK" || echo "Archive CORRUPTED"
aws s3api head-object --bucket backup-bucket --key daily/2026-03-19.tar.gz \
--checksum-mode ENABLED