1---2name: data-loss-incident-response3enabled: true4description: |5 Use when performing data loss incident response — data loss and data6 corruption incident response playbook covering immediate containment, impact7 assessment, recovery procedures from backups and replicas, data integrity8 verification, customer notification, and preventive measures. Guides teams9 through the critical decisions required when data is lost, corrupted, or10 inadvertently modified.11required_connections:12 - prefix: slack13 label: "Slack (for incident coordination)"14config_fields:15 - key: data_type16 label: "Type of Data Affected"17 required: true18 placeholder: "e.g., user records, transaction logs, configuration data"19 - key: incident_description20 label: "Incident Description"21 required: true22 placeholder: "e.g., Accidental deletion of production database table"23 - key: database_system24 label: "Database/Storage System"25 required: false26 placeholder: "e.g., PostgreSQL, MongoDB, S3"27features:28 - INCIDENT29metadata:30 source: https://skillmd.com/skills/cloudthinker-ai/data-loss-incident-response31---3233# Data Loss Incident Response3435Data Type: **{{ data_type }}**36Description: **{{ incident_description }}**37System: **{{ database_system }}**3839## CRITICAL: Stop the Bleeding First4041**Before investigating, prevent further data loss:**42431. **STOP** any running migrations, scripts, or batch jobs that may be causing the loss442. **BLOCK** write access to affected tables/collections/buckets if safe to do so453. **DO NOT** attempt recovery before understanding the scope — you may overwrite good data with bad data4647## Phase 1 — Immediate Containment (0-15 min)4849- [ ] Identify the source of data loss (accidental deletion, bug, migration, corruption)50- [ ] Stop the process causing data loss (kill query, halt migration, disable service)51- [ ] Assess if data loss is still ongoing or has stopped52- [ ] Declare incident and assign severity53- [ ] Prevent further writes to affected data stores if needed5455### Severity Classification for Data Loss5657| Severity | Criteria |58|----------|----------|59| SEV1 | Production data permanently lost, no backup, customer-facing |60| SEV1 | Active data corruption spreading to replicas/backups |61| SEV2 | Data lost but recoverable from backup within hours |62| SEV2 | Data corruption contained, not spreading |63| SEV3 | Non-critical data lost, minimal customer impact |64| SEV3 | Data recoverable from alternative sources |6566## Phase 2 — Impact Assessment (15-60 min)6768### Scope the Loss69- [ ] How many records/objects/rows are affected?70- [ ] What time range of data is affected?71- [ ] Which customers/users are impacted?72- [ ] Is the lost data reproducible from other sources?73- [ ] Are there downstream systems with copies of the data?7475### Data Classification76| Question | Answer |77|----------|--------|78| Is this PII/sensitive data? | _yes/no_ |79| Is this financial/transactional data? | _yes/no_ |80| Is this user-generated content? | _yes/no_ |81| Is this system configuration? | _yes/no_ |82| Regulatory implications? | _GDPR/HIPAA/PCI/none_ |8384## Phase 3 — Recovery8586### Recovery Options (in order of preference)8788#### Option 1: Point-in-Time Recovery (PITR)89- [ ] Identify the exact timestamp before the data loss event90- [ ] Verify PITR is available and covers the needed time range91- [ ] Restore to a SEPARATE instance (never overwrite production)92- [ ] Extract only the lost data from the restored instance93- [ ] Merge recovered data back into production9495#### Option 2: Restore from Backup96- [ ] Identify the most recent backup before the data loss97- [ ] Verify backup integrity (checksums, test restore)98- [ ] Restore backup to a separate instance99- [ ] Identify and extract only the missing data100- [ ] Apply any transactions that occurred between backup and loss event101- [ ] Merge recovered data into production102103#### Option 3: Recover from Replicas104- [ ] Check if read replicas still have the data (replication lag may help)105- [ ] Check if any replica was paused or delayed106- [ ] Extract data from replica before it catches up to the deletion107108#### Option 4: Reconstruct from Alternative Sources109- [ ] Check application-level caches110- [ ] Check CDN caches111- [ ] Check data warehouse/analytics copies112- [ ] Check audit logs for original data values113- [ ] Check event streams/message queues for replay114- [ ] Contact customers for re-submission (last resort)115116### Recovery Execution Checklist117- [ ] Create recovery plan document before executing118- [ ] Get approval from IC and data owner119- [ ] Restore to staging/test environment first120- [ ] Validate recovered data integrity121- [ ] Perform recovery in production122- [ ] Verify data counts match expected values123- [ ] Run application-level consistency checks124125## Phase 4 — Data Integrity Verification126127- [ ] Compare record counts: before vs. after128- [ ] Verify referential integrity (foreign keys, cross-references)129- [ ] Check for duplicate records introduced during recovery130- [ ] Validate data types and constraints131- [ ] Run business logic validation queries132- [ ] Check downstream systems for consistency133- [ ] Verify search indexes are updated134- [ ] Confirm cache invalidation completed135136## Phase 5 — Communication137138### Internal139- [ ] Update incident channel with recovery status140- [ ] Notify affected service owners141- [ ] Inform data governance team142143### Customer Communication (if customer data affected)144- [ ] Determine which customers lost data145- [ ] Quantify what each customer lost146- [ ] Notify affected customers with:147 - What data was lost148 - What has been recovered149 - What cannot be recovered150 - What they need to do (re-enter, re-upload, etc.)151 - Preventive measures being taken152153## Phase 6 — Prevention154155### Root Cause Remediation156- [ ] Implement safeguards against the specific failure mode157- [ ] Add confirmation prompts for destructive operations158- [ ] Implement soft-delete instead of hard-delete where possible159- [ ] Add transaction logging for all write operations160161### Backup and Recovery Improvements162- [ ] Verify backup schedule meets RPO requirements163- [ ] Test backup restoration regularly (quarterly minimum)164- [ ] Enable PITR if not already active165- [ ] Implement cross-region backup replication166- [ ] Add backup integrity monitoring167168## Counter-Rationalizations169170| Shortcut | Counter | Why |171|----------|---------|-----|172| "We can skip some steps for this case" | Adapt the workflow steps, don't skip them | Skipped steps are where incidents and oversights originate |173| "The user seems to already know what to do" | Complete all workflow phases with the user | The workflow catches blind spots that experience alone misses |174| "This is a minor case, full process is overkill" | Scale the process down, don't turn it off | Minor cases become major when unstructured; the process scales, not disappears |175| "I'll fill in the details later" | Complete each section before moving on | Deferred details are forgotten; real-time capture is more accurate |176| "The template output isn't necessary" | Always produce the structured output format | Structured output enables comparison, audit trails, and handoff to other teams |177