# Audit Log Recovery Runbook

**Purpose**: Restore audit log partitions from archival storage in the event of
accidental deletion or regional outage.

1. **Assess Scope**
   - Identify impacted retention categories and date ranges.
   - Notify Security Guild incident channel and open a ticket.

2. **Acquire Manifests**
   - Pull Sigstore attestation from
     `s3://lilith-audit-attestations/<date>/manifest.sig`.
   - Verify hash chain integrity before restoration begins.

3. **Restore Objects**
   - For `standard` tier use S3 versioned restore.
   - For `auth_term` and `medium_term` trigger AWS S3 standard-IA restores with
     24h retrieval tier.
   - For `long_term` issue Glacier Expedited retrieval requests.

4. **Rehydrate Search Index**
   - Replay restored JSONL files through the `audit-reindexer` job.
   - Validate document counts vs. manifest totals.

5. **Post-Restore Validation**
   - Re-run `tests/security.audit-logging.spec.ts` to ensure schema alignment.
   - Confirm retention timers resumed and compliance dashboards reflect restored
     data.

6. **Close-out**
   - Document timeline and lessons learned in the security incident doc.
   - Update this runbook with any deviations.
