Inferensys

Prompt

Backup Integrity Verification Prompt After Action

A practical prompt playbook for operations engineers validating backup success, completeness, recoverability, and retention compliance after a change, with structured output and silent failure detection.
Operations room with a large monitor wall for system visibility and control.
PROMPT PLAYBOOK

When to Use This Prompt

Defines the operational window, required context, and user profile for the backup integrity verification prompt.

This prompt is designed for operations engineers and SRE teams who need a structured, evidence-based verification report immediately after a scheduled or ad-hoc backup operation completes. The primary job-to-be-done is closing a change window with confidence: you must confirm that the backup is not just marked 'successful' by a tool, but is actually complete, recoverable, and compliant with retention policies before you declare the maintenance over. The ideal user is an engineer who has access to backup tool logs, storage metadata, and policy definitions, and who is authorized to make a go/no-go decision on the change window.

The prompt requires three concrete inputs to function correctly: a dump of the backup job log or summary, the expected asset inventory (what should have been captured), and the relevant retention policy snippet. It is most valuable after high-risk operations such as database migrations, schema changes, infrastructure-as-code updates, or storage reconfiguration—situations where a silent backup failure could mean data loss with no recovery path. Use it when the cost of an unverified backup is high and when a human must explicitly sign off on the verification before the team moves on.

Do not use this prompt for real-time streaming backup validation, for continuous data protection (CDP) systems where the concept of a discrete 'job' doesn't apply, or as a replacement for automated restore testing. It is a post-hoc verification report generator, not a live monitor. If your backup system already performs automated restore tests and checksum validation, this prompt adds value by synthesizing those signals into a human-readable pass/fail verdict with an explicit escalation recommendation. Avoid using it when the backup job log is incomplete or when the expected asset inventory is unknown—the prompt will correctly flag missing context as an evidence gap rather than fabricating a verdict.

PRACTICAL GUARDRAILS

Use Case Fit

Where the Backup Integrity Verification Prompt works, where it fails, and the operational prerequisites for safe deployment.

01

Good Fit: Post-Change Verification

Use when: A system change (deployment, migration, config push) has completed and you need automated confirmation that backup integrity is intact. Guardrail: Always scope the verification to the specific backup sets affected by the change window.

02

Bad Fit: Real-Time Alerting

Avoid when: You need sub-second detection of backup failures during streaming operations. Guardrail: This prompt is designed for post-action batch verification. Pair it with a separate real-time monitoring system for live failure detection.

03

Required Input: Action Context

Risk: Without the change request ID, timestamp, and expected backup targets, the model cannot correlate the verification scope. Guardrail: Require a structured input object containing the change window, affected systems, and expected backup completion criteria before invoking the prompt.

04

Operational Risk: Silent Failure

Risk: The model may report a successful verification if backup tooling returns a zero-exit code but the underlying data is corrupted or incomplete. Guardrail: Always include a checksum or byte-count comparison step in the verification harness, and never rely solely on exit codes.

05

Operational Risk: Retention Compliance

Risk: A backup can be complete and recoverable but violate retention policies, creating legal exposure. Guardrail: The prompt must cross-reference backup timestamps against the defined retention schedule and flag any policy violations as a verification failure.

06

Escalation Path: Human Approval

Risk: An automated rollback based on a false verification failure can cause unnecessary downtime. Guardrail: Route all verification failures to a human review queue with the full evidence package before any automated rollback is triggered.

PROMPT PLAYBOOK

Copy-Ready Prompt Template

A copy-ready prompt template for generating a structured backup integrity verification report after an operational action.

This prompt template is the core engine for a post-action backup verification workflow. It is designed to be pasted directly into your AI harness, where you replace the square-bracket placeholders with live data from your backup system, job scheduler, and storage backend. The prompt instructs the model to act as a reliability auditor, cross-referencing the intended backup scope against the actual results to produce a structured, evidence-backed report. The primary goal is to surface silent failures—such as missed volumes, zero-byte artifacts, or retention policy violations—that automated scripts often miss.

text
You are a senior reliability engineer auditing a backup operation.
Your task is to generate a structured Backup Integrity Verification Report.

## INPUT DATA
- Backup Job ID: [BACKUP_JOB_ID]
- Intended Scope (targets): [INTENDED_SCOPE]
- Execution Timestamp: [EXECUTION_TIMESTAMP]
- Actual Results Log: [ACTUAL_RESULTS_LOG]
- Storage Destination: [STORAGE_DESTINATION]
- Retention Policy: [RETENTION_POLICY]
- Expected Checksums (optional): [EXPECTED_CHECKSUMS]

## OUTPUT SCHEMA
You must output a single JSON object conforming to this structure:
{
  "report_id": "string",
  "verdict": "PASS|FAIL|WARN",
  "completeness_check": {
    "expected_targets": ["string"],
    "verified_targets": ["string"],
    "missing_targets": ["string"],
    "unexpected_targets": ["string"]
  },
  "recoverability_assessment": {
    "checksum_match": "boolean|null",
    "size_anomaly_detected": "boolean",
    "restore_test_recommended": "boolean",
    "notes": "string"
  },
  "retention_compliance": {
    "policy": "string",
    "violations": ["string"],
    "status": "COMPLIANT|NON_COMPLIANT"
  },
  "anomalies": [
    {
      "severity": "CRITICAL|WARNING|INFO",
      "description": "string",
      "evidence": "string"
    }
  ],
  "human_review_required": "boolean",
  "summary": "string"
}

## CONSTRAINTS
- If any target in [INTENDED_SCOPE] is missing from [ACTUAL_RESULTS_LOG], the verdict must be FAIL.
- If a size anomaly is detected (e.g., a backup is >90% smaller than a typical snapshot), flag it as a WARNING at minimum.
- If [RETENTION_POLICY] is violated, set retention_compliance.status to NON_COMPLIANT and escalate the verdict to FAIL.
- Set human_review_required to true if the verdict is FAIL or WARN.
- Base all findings strictly on the provided [ACTUAL_RESULTS_LOG] and [EXPECTED_CHECKSUMS]. Do not invent data.

To adapt this template for your environment, replace the placeholders with data from your specific toolchain. For example, [INTENDED_SCOPE] might be populated by querying your infrastructure-as-code repository for volume IDs, while [ACTUAL_RESULTS_LOG] could be the stdout from a velero or pg_dump command. The [EXPECTED_CHECKSUMS] field is optional but critical for high-integrity workflows; if your backup tool doesn't generate them, a pre-verification step should compute and inject them. Before deploying this prompt, run it against a known set of passing and failing scenarios to ensure the JSON output is reliably parseable by your downstream notification or ticketing system. A common failure mode is an incomplete [ACTUAL_RESULTS_LOG] that causes the model to hallucinate a passing verdict; always validate that the input log contains a record for every item in the intended scope before invoking the model.

IMPLEMENTATION TABLE

Prompt Variables

Inputs the prompt needs to work reliably. Validate each before execution to prevent silent failures or false positives in backup verification reports.

PlaceholderPurposeExampleValidation Notes

[BACKUP_JOB_ID]

Unique identifier for the backup job under verification

bkp-prod-db-20251024-001

Must match ^[a-zA-Z0-9_-]+$ pattern. Reject if empty or contains path traversal characters.

[BACKUP_TYPE]

Category of backup being verified (full, incremental, differential, snapshot)

full

Must be one of enum: full, incremental, differential, snapshot, log. Reject unknown values.

[SOURCE_SYSTEM]

Identifier for the system or database that was backed up

prod-postgres-primary-us-east

Must be non-empty string. Validate against known system registry if available. Reject if null.

[EXPECTED_SIZE_RANGE]

Acceptable size range for the backup artifact in bytes (min, max)

1073741824, 2147483648

Must parse as two comma-separated integers. Min must be less than Max. Reject if negative or zero.

[RETENTION_POLICY_DAYS]

Number of days the backup must be retained per policy

30

Must be positive integer. Reject if less than 1 or greater than system maximum retention limit.

[BACKUP_MANIFEST]

Structured manifest output from the backup tool containing file list, checksums, and timestamps

{"files": [...], "checksums": {...}, "started_at": "..."}

Must be valid JSON. Must contain files array and checksums object. Reject if missing required keys or unparseable.

[RECOVERY_TEST_RESULT]

Output from the most recent automated recovery test, if available

{"status": "passed", "tested_at": "2025-10-24T06:00:00Z"}

If provided, must be valid JSON with status field. Null allowed if no recovery test exists. Flag null for human review.

[PREVIOUS_VERIFICATION_REPORT]

The last verification report for this backup source, used for trend comparison

{"verified_at": "2025-10-23T...", "status": "pass"}

Null allowed for first run. If provided, must contain verified_at and status fields. Reject if status is fail without resolution evidence.

PROMPT PLAYBOOK

Implementation Harness Notes

How to wire the backup integrity verification prompt into an automated post-action workflow with validation, retries, and human escalation.

The Backup Integrity Verification Prompt is designed to run as a post-action verification gate in an automated operations pipeline. After a backup job completes—whether triggered by a deployment, a configuration change, or a scheduled run—the pipeline should call this prompt with the backup job's metadata, logs, and any available integrity check outputs. The model's structured verification report then becomes the decision point: pass the gate and close the change ticket, or fail the gate and trigger a rollback or manual investigation. This is not a prompt for interactive chat; it is a machine-to-machine verification step that must produce a parseable, trustworthy output every time.

To wire this into an application, wrap the prompt in a verification service with the following contract. Inputs: [BACKUP_JOB_ID], [BACKUP_TYPE] (full, incremental, snapshot), [SOURCE_SYSTEM], [TARGET_LOCATION], [EXPECTED_SIZE_BYTES], [RETENTION_POLICY], [JOB_LOG_SUMMARY], and [INTEGRITY_CHECK_OUTPUT] (e.g., checksum results, file counts, restore test logs). Output: a JSON object with fields verification_status (enum: PASS, FAIL, INCONCLUSIVE), checks (array of check objects with name, status, evidence, recommendation), overall_confidence (0.0–1.0), and human_review_required (boolean). The service must validate this schema strictly. If parsing fails, retry the prompt once with the same inputs and a stronger format constraint appended. If the second attempt also fails to parse, log the raw output and escalate to a human with an INCONCLUSIVE status.

Model choice and tool use matter here. Use a model with strong JSON mode or structured output support (e.g., GPT-4o with response_format, Claude 3.5 Sonnet with tool use). Do not rely on a model that frequently drifts from schema under pressure. The prompt should be called with temperature=0 to maximize determinism. If your backup system emits structured integrity data (checksums, file manifests), pass that as [INTEGRITY_CHECK_OUTPUT] rather than asking the model to imagine checks. The model's job is to reason over the evidence, compare it against expectations, and flag anomalies—not to hallucinate verification steps. For high-compliance environments, add a tool that queries the backup system's API directly for the latest job status, so the model can ground its report in live data rather than only the provided log summary.

Retry and escalation logic must be explicit. If verification_status is FAIL, the pipeline should block the next stage (e.g., deployment promotion, change closure) and route the report to the on-call channel with a link to the backup job. If human_review_required is true—even on a PASS—the report should still go to a human queue because the model detected an anomaly it cannot confidently resolve. Common triggers for this flag include: checksum mismatches on non-critical files, retention policy violations that are within a grace period, or backup sizes that deviate from expected by more than a configurable threshold (e.g., 20%). The verification service should log every report, the model version used, the prompt template version, and the final gate decision for auditability.

Testing this harness requires a suite of known backup scenarios. Create golden test cases: a clean full backup with matching checksums (expect PASS), an incremental backup with a missing parent snapshot (expect FAIL with a specific recommendation), a backup that completed but skipped three files due to permission errors (expect INCONCLUSIVE with human_review_required: true), and a backup log that is truncated or malformed (expect INCONCLUSIVE with a request for manual log review). Run these through the harness before any production change to the prompt or model. Monitor the overall_confidence distribution in production; a sudden drop below 0.7 on previously stable backup types is an early signal of model drift or a change in backup job output format. Finally, never let a parse failure or a timeout silently pass the gate—default to INCONCLUSIVE and escalate.

IMPLEMENTATION TABLE

Expected Output Contract

Fields, format, and validation rules for the backup integrity verification report. Use this contract to parse, validate, and route the model's output before presenting results or triggering downstream workflows.

Field or ElementType or FormatRequiredValidation Rule

report_id

string (UUID v4)

Must match UUID v4 regex. Generate if missing.

backup_job_id

string

Must match the [BACKUP_JOB_ID] input exactly. Fail if absent or mismatched.

verification_timestamp

ISO 8601 UTC

Must parse as valid ISO 8601. Must be within 5 minutes of system clock at validation time.

overall_status

enum: pass | fail | inconclusive

Must be one of the three allowed values. Reject any other string.

checks

array of objects

Must be a non-empty array. Each object must contain the sub-fields defined in the checks_schema row.

checks_schema

object with fields: check_name (string), status (enum: pass | fail | warning | skipped), evidence (string), confidence (float 0.0-1.0)

Each check object must pass schema validation. confidence must be a number between 0.0 and 1.0 inclusive. evidence must be non-empty if status is not skipped.

retention_compliance

object with fields: policy_name (string), compliant (boolean), details (string | null)

compliant must be a boolean. details is required when compliant is false, null allowed when true.

recoverability_assessment

string

Must be non-empty. Must contain at least one of the keywords: recoverable, unrecoverable, untested, or partial.

human_review_required

boolean

Must be true if overall_status is fail or inconclusive, or if any check status is fail. Validate this logical constraint.

PRACTICAL GUARDRAILS

Common Failure Modes

Backup verification prompts fail silently when the model assumes success, ignores partial output, or cannot access the actual backup state. These cards cover the most common failure patterns and how to prevent them.

01

Silent Assumption of Success

What to watch: The model generates a verification report that reads as passing even when backup logs, checksums, or file counts are missing or ambiguous. It fills gaps with plausible-sounding but unverified assertions. Guardrail: Require the prompt to list every missing data point explicitly in a missing_evidence array and fail the verification if any required check cannot be confirmed from provided inputs.

02

Partial Output Masking Incomplete Checks

What to watch: The model reports on the checks it could perform but omits mention of checks that were skipped due to missing input, creating a false sense of completeness. Guardrail: Define a mandatory checklist in the output schema. Every item must have a status of pass, fail, or unable_to_verify. The overall result must be fail if any item is unable_to_verify on a critical path.

03

Timestamp and Retention Window Confusion

What to watch: The model misinterprets backup timestamps, timezone offsets, or retention policy windows, declaring a backup compliant when it falls outside the required retention period. Guardrail: Normalize all timestamps to UTC in the prompt instructions. Explicitly calculate the retention boundary and compare each backup timestamp against it with a pass/fail field per backup set.

04

Recoverability Claimed Without Restoration Evidence

What to watch: The model asserts a backup is recoverable based on metadata alone, without any actual restore test results, checksum validation, or integrity scan output. Guardrail: Separate the output into metadata_checks and integrity_checks. Require explicit evidence for recoverability claims. If no integrity evidence is provided, the recoverability field must be unconfirmed and the overall verification must escalate.

05

Size and Completeness Drift Ignored

What to watch: The model accepts a backup that is significantly smaller or larger than the previous baseline without flagging it as anomalous, missing silent data loss or corruption. Guardrail: Include a baseline comparison step in the prompt. Require the model to compute percentage change from the previous backup size and flag any deviation exceeding a configurable threshold as anomaly_detected with a severity level.

06

Retention Policy Misinterpretation

What to watch: The model misapplies retention rules such as grandfather-father-son schedules, confusing which backups should be retained, expired, or marked for deletion. Guardrail: Encode the retention policy as explicit rules in the prompt context. Require the model to output a per-backup retention decision with the specific rule that applied, making interpretation errors visible in the output rather than hidden in reasoning.

IMPLEMENTATION TABLE

Evaluation Rubric

Run these checks against a golden dataset of known backup scenarios to validate the prompt's output quality before shipping.

CriterionPass StandardFailure SignalTest Method

Completeness Detection

Prompt identifies all missing backup artifacts for a given [BACKUP_MANIFEST] and [EXPECTED_ARTIFACTS] list

Output reports 'all artifacts present' when a known artifact is missing from the manifest

Golden dataset: 5 scenarios with intentionally missing artifacts. Assert output lists every missing item.

Recoverability Assessment

Prompt correctly flags a backup as non-recoverable when [CORRUPTION_LOG] contains a known checksum mismatch

Output classifies a corrupted backup as 'recoverable' or 'no issues found'

Golden dataset: 3 scenarios with injected checksum failures. Assert output contains 'recoverable: false' or equivalent severity flag.

Retention Compliance

Prompt flags a backup for retention violation when [BACKUP_TIMESTAMP] is older than [RETENTION_POLICY_DAYS]

Output reports 'compliant' for a backup outside the retention window

Golden dataset: 4 scenarios with edge-case timestamps (boundary, expired, future-dated). Assert violation flag matches expected boolean for each.

Silent Failure Detection

Prompt surfaces a warning when [BACKUP_SIZE_BYTES] is zero or [DURATION_SECONDS] is anomalously low compared to baseline

Output reports 'success' with no warning for a zero-byte backup

Golden dataset: 2 zero-byte scenarios, 2 anomalously fast scenarios. Assert output contains a warning or severity level above 'info'.

Output Schema Adherence

Output is valid JSON matching the [OUTPUT_SCHEMA] with all required fields present and correctly typed

Output is missing a required field, contains an extra field, or has a type mismatch (e.g., string for boolean)

Automated schema validation: parse output, validate against JSON Schema. Assert true for all golden dataset outputs.

Evidence Grounding

Every finding in the report cites a specific source field from the input (e.g., manifest path, log line, timestamp)

Output contains a finding with a generic citation like 'from the logs' or no citation at all

Manual review of 5 outputs. Assert every finding block contains a non-empty, specific [SOURCE] reference.

Uncertainty Communication

Prompt uses qualifying language ('may indicate', 'requires manual review') for ambiguous failure signals like a slow but non-zero duration

Output states a definitive failure conclusion for an ambiguous signal without qualification

Golden dataset: 2 scenarios with borderline metrics. Assert output contains at least one uncertainty qualifier or an escalation recommendation.

Escalation Trigger

Prompt includes a structured escalation recommendation when [CRITICALITY_LEVEL] is 'high' and any verification check fails

Output contains no escalation instruction for a high-criticality failure scenario

Golden dataset: 2 high-criticality failure scenarios. Assert output contains an escalation block with a recommended [REVIEW_QUEUE].

ADAPTATION OPTIONS

Adapt This Prompt

How to adapt

Start with the base prompt and a single backup tool. Remove strict schema enforcement and use plain-text output. Focus on getting a readable verification summary before adding structured fields.

code
Verify the backup job [BACKUP_JOB_ID] for [TARGET_SYSTEM].
Check: file count, total size, and any error messages in the log.
Report what you find in plain language.

Watch for

  • The model summarizing log output without actually checking for silent corruption
  • Missing checksum or hash verification when the tool supports it
  • Overly confident language when log parsing is incomplete
Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.