/** * Disaster Recovery Types * Type definitions for backup and recovery operations */ /** * Backup status */ export declare enum BackupStatus { PENDING = "pending", IN_PROGRESS = "in_progress", COMPLETED = "completed", FAILED = "failed", EXPIRED = "expired" } /** * Recovery status */ export declare enum RecoveryStatus { PENDING = "pending", IN_PROGRESS = "in_progress", COMPLETED = "completed", FAILED = "failed", PARTIAL = "partial" } /** * Backup type */ export declare enum BackupType { FULL = "full", INCREMENTAL = "incremental", DIFFERENTIAL = "differential", SNAPSHOT = "snapshot" } /** * Storage tier for backups */ export declare enum StorageTier { HOT = "hot",// Instant access WARM = "warm",// Minutes to hours COLD = "cold",// Hours to days ARCHIVE = "archive" } /** * Backup configuration */ export interface BackupConfig { id?: string; name: string; description?: string; type: BackupType; sources?: string[]; destination?: string; exclusions?: string[]; compression?: { enabled: boolean; algorithm?: 'gzip' | 'brotli' | 'zstd'; level?: number; }; schedule?: { enabled: boolean; cron?: string; interval?: number; timezone?: string; }; retention?: { days?: number; count?: number; policy?: 'count' | 'age' | 'size'; }; storage?: { provider: 'local' | 's3' | 'gcs' | 'azure' | 'custom'; bucket?: string; path?: string; tier?: StorageTier; region?: string; connectionString?: string; container?: string; encryption?: { enabled: boolean; algorithm?: string; keyId?: string; }; compression?: { enabled: boolean; algorithm?: 'gzip' | 'brotli' | 'zstd'; level?: number; }; }; includes?: string[]; excludes?: string[]; verification?: { enabled: boolean; checksumAlgorithm?: 'md5' | 'sha256' | 'sha512'; }; notifications?: { enabled: boolean; channels?: Array<'email' | 'slack' | 'webhook'>; onSuccess?: boolean; onFailure?: boolean; }; metadata?: Record; } /** * Backup record */ export interface Backup { id: string; config: BackupConfig; status: BackupStatus; type: BackupType; location?: string; createdAt: Date; completedAt?: Date; expiresAt?: Date; size?: number; checksum?: string; files?: Array<{ path: string; size: number; checksum?: string; }>; metadata?: { version?: string; tags?: string[]; parent?: string; sourceVersion?: string; custom?: Record; }; error?: { message: string; code?: string; timestamp: Date; }; stats?: { filesCount: number; totalSize: number; compressedSize: number; compressionRatio: number; duration: number; throughput: number; }; } /** * Recovery operation */ export interface RecoveryOperation { id: string; backupId: string; status: RecoveryStatus; startedAt: Date; completedAt?: Date; targetPath?: string; options?: { destination?: string; overwrite?: boolean; preservePermissions?: boolean; verifyChecksum?: boolean; skipVerification?: boolean; continueOnError?: boolean; parallelism?: number; }; progress?: { filesRestored: number; filesTotal: number; bytesRestored: number; bytesTotal: number; percentage: number; }; error?: { message: string; code?: string; timestamp: Date; }; stats?: { duration: number; throughput: number; filesRestored: number; filesFailed: number; }; } /** * Recovery point objective (RPO) configuration */ export interface RPOConfig { target: number; actual?: number; status?: 'met' | 'at-risk' | 'exceeded'; } /** * Recovery time objective (RTO) configuration */ export interface RTOConfig { target: number; actual?: number; status?: 'met' | 'at-risk' | 'exceeded'; } /** * Disaster recovery plan */ export interface DisasterRecoveryPlan { id: string; name: string; description?: string; rpo: RPOConfig; rto: RTOConfig; backupConfig: BackupConfig; recoverySteps: Array<{ order: number; name: string; description?: string; automated: boolean; estimatedDuration?: number; timeout?: number; script?: string; }>; testing?: { enabled: boolean; schedule?: { cron?: string; interval?: number; }; lastTest?: Date; nextTest?: Date; results?: Array<{ date: Date; success: boolean; duration: number; notes?: string; }>; }; contacts?: Array<{ name: string; role: string; email?: string; phone?: string; }>; metadata?: Record; } /** * Failover configuration */ export interface FailoverConfig { enabled: boolean; mode: 'automatic' | 'manual'; primaryRegion: string; secondaryRegions: string[]; secondary: { region: string; endpoints: string[]; }; routing?: { type: 'dns' | 'loadbalancer' | 'custom'; config: Record; }; dns?: { provider: string; zoneId: string; recordName: string; }; healthCheck?: { endpoint: string; interval: number; timeout: number; failureThreshold: number; }; triggers?: Array<{ type: 'health-check' | 'latency' | 'error-rate' | 'manual'; threshold?: number; cooldown?: number; }>; } /** * Backup verification result */ export interface BackupVerification { backupId: string; status: 'valid' | 'invalid' | 'corrupted'; verifiedAt: Date; checksumMatch: boolean; filesVerified: number; filesTotal: number; errors?: string[]; } /** * Backup retention report */ export interface RetentionReport { totalBackups: number; totalSize: number; oldestBackup: Date; newestBackup: Date; byType: Record; byTier: Record; toBeDeleted: string[]; } //# sourceMappingURL=types.d.ts.map