ObjectStackObjectStack

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

TypeScript Usage

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);

BackupConfig

Backup configuration

Properties

PropertyTypeRequiredDescription
strategyEnum<'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 }optionalBackup encryption settings
compression{ enabled?: boolean; algorithm?: Enum<'gzip' | 'zstd' | 'lz4' | 'snappy'> }optionalBackup compression settings
verifyAfterBackupbooleanoptional (default: true)Verify backup integrity after creation

Nested Shape: BackupConfig.retention

PropertyTypeRequiredDescription
daysnumber✅Retention period in days
minCopiesnumberoptional (default: 3)Minimum backup copies to retain
maxCopiesnumberoptionalMaximum backup copies to store

Nested Shape: BackupConfig.destination

PropertyTypeRequiredDescription
typeEnum<'s3' | 'gcs' | 'azure_blob' | 'local'>✅Storage backend type
bucketstringoptionalCloud storage bucket/container name
pathstringoptionalStorage path prefix
regionstringoptionalCloud storage region

Nested Shape: BackupConfig.encryption

PropertyTypeRequiredDescription
enabledbooleanoptional (default: true)Enable backup encryption
algorithmEnum<'AES-256-GCM' | 'AES-256-CBC' | 'ChaCha20-Poly1305'>optional (default: "AES-256-GCM")Encryption algorithm
keyIdstringoptionalKMS key ID for encryption

Nested Shape: BackupConfig.compression

PropertyTypeRequiredDescription
enabledbooleanoptional (default: true)Enable backup compression
algorithmEnum<'gzip' | 'zstd' | 'lz4' | 'snappy'>optional (default: "zstd")Compression algorithm

BackupRetention

Backup retention policy

Properties

PropertyTypeRequiredDescription
daysnumber✅Retention period in days
minCopiesnumberoptional (default: 3)Minimum backup copies to retain
maxCopiesnumberoptionalMaximum backup copies to store

BackupStrategy

Backup strategy type

Allowed Values

  • full
  • incremental
  • differential

DisasterRecoveryPlan

Complete disaster recovery plan configuration

Properties

PropertyTypeRequiredDescription
enabledbooleanoptional (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; … }optionalMulti-region failover configuration
replication{ mode?: Enum<'synchronous' | 'asynchronous' | 'semi_synchronous'>; maxLagSeconds?: number; includeObjects?: string[]; excludeObjects?: string[] }optionalData replication settings
testing{ enabled?: boolean; notificationChannel?: string }optionalAutomated disaster recovery testing
runbookUrlstringoptionalURL to disaster recovery runbook/playbook
contacts{ name: string; role: string; email?: string; phone?: string }[]optionalEmergency contact list for DR incidents

Nested Shape: DisasterRecoveryPlan.rpo

PropertyTypeRequiredDescription
valuenumber✅RPO value
unitEnum<'seconds' | 'minutes' | 'hours'>optional (default: "minutes")RPO time unit

Nested Shape: DisasterRecoveryPlan.rto

PropertyTypeRequiredDescription
valuenumber✅RTO value
unitEnum<'seconds' | 'minutes' | 'hours'>optional (default: "minutes")RTO time unit

Nested Shape: DisasterRecoveryPlan.backup

PropertyTypeRequiredDescription
strategyEnum<'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 }optionalBackup encryption settings
compression{ enabled?: boolean; algorithm?: Enum<'gzip' | 'zstd' | 'lz4' | 'snappy'> }optionalBackup compression settings
verifyAfterBackupbooleanoptional (default: true)Verify backup integrity after creation

Nested Shape: DisasterRecoveryPlan.failover

PropertyTypeRequiredDescription
modeEnum<'active_passive' | 'active_active' | 'pilot_light' | 'warm_standby'>optional (default: "active_passive")Failover mode
autoFailoverbooleanoptional (default: true)Enable automatic failover
healthCheckIntervalSecondsnumberoptional (default: 30)Health check interval in seconds
healthCheckIntervalneveroptional[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.
failureThresholdnumberoptional (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'> }optionalDNS failover settings

Nested Shape: DisasterRecoveryPlan.replication

PropertyTypeRequiredDescription
modeEnum<'synchronous' | 'asynchronous' | 'semi_synchronous'>optional (default: "asynchronous")Data replication mode
maxLagSecondsnumberoptionalMaximum acceptable replication lag in seconds
includeObjectsstring[]optionalObjects to replicate (empty = all)
excludeObjectsstring[]optionalObjects to exclude from replication

Nested Shape: DisasterRecoveryPlan.testing

PropertyTypeRequiredDescription
enabledbooleanoptional (default: false)Enable automated DR testing
notificationChannelstringoptionalNotification channel for DR test results

Nested Shape: DisasterRecoveryPlan.contacts[number]

PropertyTypeRequiredDescription
namestring✅Contact name
rolestring✅Contact role (e.g., "DBA", "SRE Lead")
emailstringoptionalContact email
phonestringoptionalContact phone

FailoverConfig

Failover configuration

Properties

PropertyTypeRequiredDescription
modeEnum<'active_passive' | 'active_active' | 'pilot_light' | 'warm_standby'>optional (default: "active_passive")Failover mode
autoFailoverbooleanoptional (default: true)Enable automatic failover
healthCheckIntervalSecondsnumberoptional (default: 30)Health check interval in seconds
healthCheckIntervalneveroptional[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.
failureThresholdnumberoptional (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'> }optionalDNS failover settings

Nested Shape: FailoverConfig.regions[number]

PropertyTypeRequiredDescription
namestring✅Region identifier (e.g., "us-east-1", "eu-west-1")
roleEnum<'primary' | 'secondary' | 'witness'>✅Region role
endpointstringoptionalRegion endpoint URL
prioritynumberoptionalFailover priority (lower = higher priority)

Nested Shape: FailoverConfig.dns

PropertyTypeRequiredDescription
ttlnumberoptional (default: 60)DNS TTL in seconds for failover (unit per DNS resource-record TTL (RFC 1035 §4.1.3))
providerEnum<'route53' | 'cloudflare' | 'azure_dns' | 'custom'>optionalDNS provider for automatic failover

FailoverMode

Failover mode

Allowed Values

  • active_passive
  • active_active
  • pilot_light
  • warm_standby

RPO

Recovery Point Objective (maximum acceptable data loss)

Properties

PropertyTypeRequiredDescription
valuenumber✅RPO value
unitEnum<'seconds' | 'minutes' | 'hours'>optional (default: "minutes")RPO time unit

RTO

Recovery Time Objective (maximum acceptable downtime)

Properties

PropertyTypeRequiredDescription
valuenumber✅RTO value
unitEnum<'seconds' | 'minutes' | 'hours'>optional (default: "minutes")RTO time unit

On this page