Automated backup verification for GistPin's PostgreSQL database.
| Script | Purpose |
|---|---|
infrastructure/scripts/test-backup.sh |
Full backup test: restore → validate → perf check → cleanup |
infrastructure/scripts/restore-backup.sh |
Restore a specific backup to a target database |
# Test the latest backup
./infrastructure/scripts/test-backup.sh
# Test a specific backup
./infrastructure/scripts/test-backup.sh 20260601-020000
# Restore to a named DB
./infrastructure/scripts/restore-backup.sh latest gistpin_restore_test- Restore — backup file is restored to an isolated test database
- Data integrity — record count validated (fails if 0 rows)
- Query performance — basic latency check on the
giststable - Cleanup — test database dropped after verification
Add to cron or CI to run after each backup job:
# infrastructure/ci/backup-verification.yml already triggers thisIf the test fails, the script exits non-zero and logs to /tmp/backup-test-*.log. CI will block deployment until resolved.