> ## Documentation Index
> Fetch the complete documentation index at: https://docs.encoreos.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Disaster Recovery & Business Continuity – Integration

> Feature ID: PF-90 -disaster-recovery-business-continuity Status: \U0001F4CB Specification Last Updated: 2026-03-23

**Feature ID:** PF-90\
**Spec:** [PF-90-disaster-recovery-business-continuity](../../../specs/pf/specs/PF-90-disaster-recovery-business-continuity.md)\
**Status:** 📋 Specification\
**Last Updated:** 2026-03-23

***

## Overview

PF-90 defines application-layer backup orchestration, tenant-scoped restore workflows, DR drill automation, and compliance evidence generation. It builds on PF-44 for export-oriented data extraction patterns and PF-04 for audit trails. No direct core-to-core dependencies; all consumption is PF-internal or external storage (S3-compatible).

***

## Dependencies

| Dependency                         | Type           | Status | Purpose                                                                       |
| ---------------------------------- | -------------- | ------ | ----------------------------------------------------------------------------- |
| PF-01 (Organizations)              | Platform       | ✅      | Tenant scope (`organization_id`) for policies, backup metadata, drill reports |
| PF-04 (Audit Logging)              | Platform       | ✅      | Backup, restore, and drill events                                             |
| PF-44 (Data Export)                | Platform       | ✅      | Export framework for tiered backup extraction                                 |
| PF-48 (Security Monitoring)        | Platform       | 📝     | Alerts on backup failures and drill regressions                               |
| Supabase / external object storage | Infrastructure | N/A    | Encrypted offsite artifacts (opaque bucket credentials)                       |

***

## API / Edge Functions (planned)

| Function              | Purpose                                                                                           |
| --------------------- | ------------------------------------------------------------------------------------------------- |
| `backup-orchestrator` | Scheduled evaluation of `pf_backup_policies`; invokes export pipeline; writes `pf_backup_records` |
| `tenant-restore`      | Staging restore, integrity checks, optional promotion workflow                                    |
| `dr-drill-runner`     | Isolated restore + validation suite; writes `pf_dr_drill_reports`                                 |

Contracts (request/response shapes, error codes) to be finalized in implementation tasks; must enforce `organization_id` on all mutations and sanitize errors per platform patterns.

**Edge implementation checklist (PF-90 / `.cursor/rules/edge-functions.md`):** `getCorsHeaders(req.headers.get('origin'))`, `createLogger` from `_shared/logger.ts`, `verifyOrgAccess` / `verifyOrgRole` for JWT paths; no PHI in logs or error surfaces.

***

## Event / Audit Contracts (PF-04)

| Event (conceptual)                                      | Publisher             | Notes                                                                         |
| ------------------------------------------------------- | --------------------- | ----------------------------------------------------------------------------- |
| `backup_started` / `backup_completed` / `backup_failed` | `backup-orchestrator` | Include tier, `backup_record_id`, byte size, checksum; no raw PHI in messages |
| `restore_initiated` / `restore_completed`               | `tenant-restore`      | Include tenant id, operator, timestamp range                                  |
| `dr_drill_completed`                                    | `dr-drill-runner`     | Include pass/fail matrix summary                                              |

***

## Permission Keys

See spec **Security Considerations** — `pf.backup.*`, `pf.dr-drill.*`. Seed via `pf_module_permissions` in migration tasks when UI ships.

***

## Integration Matrix

PF-90 is Platform Foundation only. Entry recorded in [CROSS\_CORE\_INTEGRATIONS.md](./CROSS_CORE_INTEGRATIONS.md). Cross-core features consume DR capabilities only through PF APIs or documented events, not direct table access from other cores.
