Core Track Guardrails-first chapter in core learning path.

Estimated Time

  • Reading: 20-25 min
  • Lab: 45-60 min
  • Quiz: 10-15 min

Prerequisites

Source Code References

  • cnpg-clusters/ Members
  • main.tf Members

Sign in to view source code.

What You Will Produce

A reproducible lab result plus quiz verification and incident-safe operating evidence.

Restore Verification Checklist

A restore is considered valid only if all these checks pass:

  • Schema Exists: Verify that database objects and expected migrations are present.
  • Read/Write Check: Execute a sample read query and write query to confirm access.
  • App Smoke Check: Verify that the application can successfully connect and function.
  • Permissions: Ensure all required database roles and grants are intact.
  • Row Count: Confirm that the record counts match the state of the backup.

Core Exercises (Required)

  1. Verify Scheduled Backups: Use kubectl get backup -n develop to identify the most recent successful backup.
  2. Execute Manual Backup: Manually trigger a backup for the develop Postgres cluster and verify its completion.
  3. Simulate a Restore: Restore the database into a separate namespace. Use a temporary pod to query the data and verify its integrity.
  4. Identify Gaps: Intentionally delete a database role before taking a backup. Restore the backup and document how this affects the application.

Challenge Exercise (Optional)

Corrupted Backup Restore: Intentionally corrupt a CNPG backup artifact, attempt a restore, and verify that the restore verification checklist correctly identifies the failure. Document which check caught the corruption.

Done When

You have completed this chapter when:

  • You can verify that scheduled backups are running and completing successfully.
  • You have successfully executed a manual backup.
  • You have performed a restore simulation and validated the recovered data.
  • You understand why a “successful” backup status is not recovery proof.

Knowledge Check

Before finishing this chapter, complete the Quiz to verify your understanding of the guardrail principles.