Backup Verification
Automates the verification of database backup restorability by repeatedly testing restore operations until successful or maximum iterations reached.
Goal
Verify backup restorability
How to Run
Run this loop in your terminal to validate database backup integrity through restore testing.
- 01
Open CLI Tool
Launch Cursor, Claude Code, Codex, OpenCode, or Gemini CLI in your database project directory.
- 02
Initiate Loop
Execute the kickoff prompt to start the backup verification process.
- 03
Monitor Execution
Observe automated restore test attempts and verify successful completion.
Workflow Steps
- 01
Locate latest backup file
Verify backup file path and integrity
- 02
Prepare test environment
Initialize temporary database instance
- 03
Execute restore test command
Run restore test against backup file
- 04
Validate restore outcome
Confirm restore completed without errors
- 05
Cleanup test environment
Remove temporary database instance
- 06
Evaluate exit condition
If restore succeeds, exit loop; else repeat until max iterations
Kickoff Prompt
Start the "Backup Verification" loop. Goal: Verify backup restorability Max iterations: 10 Between iterations run: restore test Exit when: Restore succeeds Begin Backup Verification Loop. Execute restore test command and verify backup restorability. Continue until successful restore or 10 iterations. Self-pace this loop. After each iteration, run `restore test` and evaluate the output, and only continue if the exit condition is not met (Restore succeeds). Stop when the exit condition passes or 10 iterations are reached. Give a short status update each pass.
Guardrails
hardcoded- ·Ensure backup file exists before starting loop
- ·Verify sufficient disk space for restore operation
- ·Confirm database service is accessible and not in use
- ·Do not overwrite production data during restore tests
Flow Diagram
Related loops — Database
Database
Database Schema Sync Loop
Automatically detects and resolves schema drift between your database and ORM models by iteratively applying necessary migrations and verifying alignment.
Database
Foreign Key Repair Loop
This loop identifies and repairs broken foreign key relationships in a relational database. It systematically detects constraint violations, proposes corrective actions, and validates fixes until all foreign key checks pass.
Database
Query Performance Fixer
An automated workflow to identify, analyze, and optimize slow-running database queries through iterative benchmarking and targeted improvements.