Disaster Recovery — System Protocol reference Disaster Recovery schemas of the ObjectStack System Protocol: BackupConfig and 7 more — each property with its type, default and a TypeScript example.
Source: packages/spec/src/system/disaster-recovery.zod.ts
import { BackupConfigSchema, BackupRetentionSchema, BackupStrategySchema, DisasterRecoveryPlanSchema, FailoverConfigSchema, FailoverModeSchema, RPOSchema, RTOSchema } from '@objectstack/spec/system' ;
import type { BackupConfig, BackupRetention, BackupStrategy, DisasterRecoveryPlan, FailoverConfig, FailoverMode, RPO, RTO } from '@objectstack/spec/system' ;
// Validate data
const result = BackupConfigSchema. parse (data);
Backup configuration
Property Type Required Description strategy Enum<'full' | 'incremental' | 'differential'>optional (default: "incremental") Backup strategy retention { days: number; minCopies?: number; maxCopies?: number }✅ Backup retention policy destination { type: Enum<'s3' | 'gcs' | 'azure_blob' | 'local'>; bucket?: string; path?: string; region?: string }✅ Backup storage destination encryption { enabled?: boolean; algorithm?: Enum<'AES-256-GCM' | 'AES-256-CBC' | 'ChaCha20-Poly1305'>; keyId?: string }optional Backup encryption settings compression { enabled?: boolean; algorithm?: Enum<'gzip' | 'zstd' | 'lz4' | 'snappy'> }optional Backup compression settings verifyAfterBackup booleanoptional (default: true) Verify backup integrity after creation
Property Type Required Description days number✅ Retention period in days minCopies numberoptional (default: 3) Minimum backup copies to retain maxCopies numberoptional Maximum backup copies to store
Property Type Required Description type Enum<'s3' | 'gcs' | 'azure_blob' | 'local'>✅ Storage backend type bucket stringoptional Cloud storage bucket/container name path stringoptional Storage path prefix region stringoptional Cloud storage region
Property Type Required Description enabled booleanoptional (default: true) Enable backup encryption algorithm Enum<'AES-256-GCM' | 'AES-256-CBC' | 'ChaCha20-Poly1305'>optional (default: "AES-256-GCM") Encryption algorithm keyId stringoptional KMS key ID for encryption
Property Type Required Description enabled booleanoptional (default: true) Enable backup compression algorithm Enum<'gzip' | 'zstd' | 'lz4' | 'snappy'>optional (default: "zstd") Compression algorithm
Backup retention policy
Property Type Required Description days number✅ Retention period in days minCopies numberoptional (default: 3) Minimum backup copies to retain maxCopies numberoptional Maximum backup copies to store
Backup strategy type
full
incremental
differential
Complete disaster recovery plan configuration
Property Type Required Description enabled booleanoptional (default: false) Enable disaster recovery plan rpo { value: number; unit?: Enum<'seconds' | 'minutes' | 'hours'> }✅ Recovery Point Objective rto { value: number; unit?: Enum<'seconds' | 'minutes' | 'hours'> }✅ Recovery Time Objective backup { strategy?: Enum<'full' | 'incremental' | 'differential'>; retention: object; destination: object; encryption?: object; … }✅ Backup configuration failover { mode?: Enum<'active_passive' | 'active_active' | 'pilot_light' | 'warm_standby'>; autoFailover?: boolean; healthCheckIntervalSeconds?: number; failureThreshold?: number; … }optional Multi-region failover configuration replication { mode?: Enum<'synchronous' | 'asynchronous' | 'semi_synchronous'>; maxLagSeconds?: number; includeObjects?: string[]; excludeObjects?: string[] }optional Data replication settings testing { enabled?: boolean; notificationChannel?: string }optional Automated disaster recovery testing runbookUrl stringoptional URL to disaster recovery runbook/playbook contacts { name: string; role: string; email?: string; phone?: string }[]optional Emergency contact list for DR incidents
Property Type Required Description value number✅ RPO value unit Enum<'seconds' | 'minutes' | 'hours'>optional (default: "minutes") RPO time unit
Property Type Required Description value number✅ RTO value unit Enum<'seconds' | 'minutes' | 'hours'>optional (default: "minutes") RTO time unit
Property Type Required Description strategy Enum<'full' | 'incremental' | 'differential'>optional (default: "incremental") Backup strategy retention { days: number; minCopies?: number; maxCopies?: number }✅ Backup retention policy destination { type: Enum<'s3' | 'gcs' | 'azure_blob' | 'local'>; bucket?: string; path?: string; region?: string }✅ Backup storage destination encryption { enabled?: boolean; algorithm?: Enum<'AES-256-GCM' | 'AES-256-CBC' | 'ChaCha20-Poly1305'>; keyId?: string }optional Backup encryption settings compression { enabled?: boolean; algorithm?: Enum<'gzip' | 'zstd' | 'lz4' | 'snappy'> }optional Backup compression settings verifyAfterBackup booleanoptional (default: true) Verify backup integrity after creation
Property Type Required Description mode Enum<'active_passive' | 'active_active' | 'pilot_light' | 'warm_standby'>optional (default: "active_passive") Failover mode autoFailover booleanoptional (default: true) Enable automatic failover healthCheckIntervalSeconds numberoptional (default: 30) Health check interval in seconds healthCheckInterval neveroptional [REMOVED] FailoverConfig.healthCheckInterval was renamed to healthCheckIntervalSeconds in @objectstack/spec 17 — the unit of a duration-shaped number lives in the key name, not only in the describe prose. Rename the key to healthCheckIntervalSeconds; the value (seconds) and the 30 default are unchanged. failureThreshold numberoptional (default: 3) Consecutive failures before failover regions { name: string; role: Enum<'primary' | 'secondary' | 'witness'>; endpoint?: string; priority?: number }[]✅ Multi-region configuration (minimum 2 regions) dns { ttl?: number; provider?: Enum<'route53' | 'cloudflare' | 'azure_dns' | 'custom'> }optional DNS failover settings
Property Type Required Description mode Enum<'synchronous' | 'asynchronous' | 'semi_synchronous'>optional (default: "asynchronous") Data replication mode maxLagSeconds numberoptional Maximum acceptable replication lag in seconds includeObjects string[]optional Objects to replicate (empty = all) excludeObjects string[]optional Objects to exclude from replication
Property Type Required Description enabled booleanoptional (default: false) Enable automated DR testing notificationChannel stringoptional Notification channel for DR test results
Property Type Required Description name string✅ Contact name role string✅ Contact role (e.g., "DBA", "SRE Lead") email stringoptional Contact email phone stringoptional Contact phone
Failover configuration
Property Type Required Description mode Enum<'active_passive' | 'active_active' | 'pilot_light' | 'warm_standby'>optional (default: "active_passive") Failover mode autoFailover booleanoptional (default: true) Enable automatic failover healthCheckIntervalSeconds numberoptional (default: 30) Health check interval in seconds healthCheckInterval neveroptional [REMOVED] FailoverConfig.healthCheckInterval was renamed to healthCheckIntervalSeconds in @objectstack/spec 17 — the unit of a duration-shaped number lives in the key name, not only in the describe prose. Rename the key to healthCheckIntervalSeconds; the value (seconds) and the 30 default are unchanged. failureThreshold numberoptional (default: 3) Consecutive failures before failover regions { name: string; role: Enum<'primary' | 'secondary' | 'witness'>; endpoint?: string; priority?: number }[]✅ Multi-region configuration (minimum 2 regions) dns { ttl?: number; provider?: Enum<'route53' | 'cloudflare' | 'azure_dns' | 'custom'> }optional DNS failover settings
Property Type Required Description name string✅ Region identifier (e.g., "us-east-1", "eu-west-1") role Enum<'primary' | 'secondary' | 'witness'>✅ Region role endpoint stringoptional Region endpoint URL priority numberoptional Failover priority (lower = higher priority)
Property Type Required Description ttl numberoptional (default: 60) DNS TTL in seconds for failover (unit per DNS resource-record TTL (RFC 1035 §4.1.3)) provider Enum<'route53' | 'cloudflare' | 'azure_dns' | 'custom'>optional DNS provider for automatic failover
Failover mode
active_passive
active_active
pilot_light
warm_standby
Recovery Point Objective (maximum acceptable data loss)
Property Type Required Description value number✅ RPO value unit Enum<'seconds' | 'minutes' | 'hours'>optional (default: "minutes") RPO time unit
Recovery Time Objective (maximum acceptable downtime)
Property Type Required Description value number✅ RTO value unit Enum<'seconds' | 'minutes' | 'hours'>optional (default: "minutes") RTO time unit