Disaster Recovery Plan
Run ID: 69cccfec3e7fb09ff16a55712026-04-01Infrastructure
PantheraHive BOS
BOS Dashboard

Generate a comprehensive disaster recovery plan with RTO/RPO targets, backup strategies, failover procedures, communication plans, and testing schedules.

Important Clarification Regarding Request Discrepancy:

There appears to be a discrepancy between the stated workflow step description ("Generate a comprehensive disaster recovery plan with RTO/RPO targets, backup strategies, failover procedures, communication plans, and testing schedules") and the specific "User Input" provided at the end ("Create a comprehensive marketing strategy with target audience analysis, channel recommendations, messaging framework, and KPIs").

Given that this is "Step 1 of 3 for the workflow: 'Disaster Recovery Plan'", we will proceed with generating a Comprehensive Disaster Recovery Plan as per the workflow's stated objective. If a marketing strategy is indeed required, please submit it as a separate, distinct request to avoid confusion and ensure accurate deliverable generation.


Comprehensive Disaster Recovery Plan

This document outlines the Disaster Recovery Plan (DRP) for [Organization Name], designed to ensure the rapid recovery of critical IT systems, applications, and data following a disruptive event. The primary goal is to minimize downtime, data loss, and business impact, enabling the organization to resume operations efficiently and effectively.

1. Introduction and Purpose

The purpose of this Disaster Recovery Plan (DRP) is to provide a structured and actionable framework for responding to and recovering from disruptive events that could impact [Organization Name]'s critical IT infrastructure and operations. This plan aims to:

  • Minimize the duration of service disruption.
  • Reduce the impact of data loss.
  • Ensure business continuity and operational resilience.
  • Safeguard the organization's reputation and financial stability.
  • Comply with relevant regulatory requirements and industry best practices.

2. Scope

This DRP covers all critical IT systems, applications, data, and associated infrastructure essential for [Organization Name]'s core business operations. This includes, but is not limited to:

  • Core Business Applications: [List 3-5 key applications, e.g., CRM, ERP, Financial Systems, E-commerce Platform].
  • Data Repositories: Databases (SQL, NoSQL), file servers, document management systems.
  • Network Infrastructure: Routers, switches, firewalls, VPNs.
  • Server Infrastructure: Physical and virtual servers, operating systems.
  • Cloud Services: [Specify any critical cloud services, e.g., AWS, Azure, Google Cloud, SaaS applications].
  • Key Personnel: Roles and responsibilities for incident response and recovery.
  • Physical Locations: Primary data center(s), branch offices, remote work capabilities.

3. Key Personnel and Roles

A dedicated Disaster Recovery Team (DRT) will be responsible for executing this plan. Roles and responsibilities are assigned as follows:

  • DRP Coordinator (e.g., CIO/IT Director):

* Overall leadership and decision-making during a disaster.

* Official declaration of a disaster.

* Primary contact for executive management.

* Ensures DRP is regularly reviewed and tested.

  • Incident Response Lead (e.g., Senior IT Manager):

* Manages the technical recovery efforts.

* Coordinates with various technical teams.

* Reports progress to DRP Coordinator.

  • Network Team Lead:

* Restoration of network connectivity (LAN/WAN, VPN).

* Configuration of network devices at recovery site.

* DNS management.

  • Server & Virtualization Team Lead:

* Recovery of physical and virtual servers.

* Operating system restoration and configuration.

* Application deployment on recovered servers.

  • Database Team Lead:

* Database restoration and consistency checks.

* Data integrity verification.

* Application connectivity to databases.

  • Application Team Lead(s):

* Verification of application functionality post-recovery.

* User acceptance testing coordination.

* Specific application configuration.

  • Communications Lead (e.g., HR/Marketing Lead):

* Manages internal and external communications.

* Executes the communication plan.

  • Security Lead:

* Ensures security protocols are maintained during and after recovery.

* Monitors for new threats during recovery.

Emergency Contact List: An up-to-date contact list for all DRT members, key vendors, and external services will be maintained in Appendix A.

4. Recovery Time Objectives (RTO) & Recovery Point Objectives (RPO)

RTO and RPO targets are determined based on Business Impact Analysis (BIA) and criticality assessments of systems and data.

  • Recovery Time Objective (RTO): The maximum tolerable duration of time that a system, application, or service can be down following a disaster before significant damage to the business occurs.
  • Recovery Point Objective (RPO): The maximum tolerable amount of data loss, measured in time, that an application or system can sustain during a disaster.

| System/Application Category | Example Systems | RTO Target | RPO Target | Justification |

| :-------------------------- | :-------------------------------------------------- | :---------------- | :---------------- | :------------------------------------------------------------------- |

| Tier 0: Mission-Critical | Core ERP, Primary Financial System, E-commerce | < 1 hour | < 15 minutes | Immediate and severe financial/reputational impact if unavailable. |

| Tier 1: Critical | CRM, HR System, Internal Messaging, Key Databases | 2-4 hours | < 1 hour | Significant business disruption, potential financial loss. |

| Tier 2: Important | Development Environments, Intranet, File Servers | 8-24 hours | < 4 hours | Moderate disruption, manageable workaround for a limited period. |

| Tier 3: Non-Critical | Test Environments, Archival Systems, Non-essential | > 24 hours / Best Effort | > 24 hours / Best Effort | Minimal immediate business impact, can tolerate longer downtime. |

  • Continuous Review: RTO/RPO targets will be reviewed annually or after any significant changes to business processes or IT infrastructure.

5. Backup and Data Recovery Strategies

A robust backup strategy is fundamental to data recovery and meeting RPO targets.

5.1. Data Backup Strategy

  • Backup Types & Frequency:

* Mission-Critical Data (Tier 0): Continuous Data Protection (CDP) or transaction log shipping with backups every 15 minutes.

* Critical Data (Tier 1): Incremental backups hourly, full backups daily.

* Important Data (Tier 2): Incremental backups daily, full backups weekly.

* Non-Critical Data (Tier 3): Full backups weekly.

  • Backup Locations (3-2-1 Rule):

* 3 Copies of Data: Original + two backups.

* 2 Different Media Types: e.g., Disk and Cloud.

* 1 Off-site Copy: Stored geographically separate from the primary data center.

  • Retention Policies:

* Daily backups: Retained for 30 days.

* Weekly backups: Retained for 90 days.

* Monthly backups: Retained for 1 year.

* Yearly archives: Retained for 7 years (or as per regulatory requirements).

  • Encryption: All backups, both in transit and at rest, will be encrypted using [Specify encryption standard, e.g., AES-256].
  • Integrity Checks: Regular (e.g., weekly) verification of backup integrity to ensure recoverability. Test restores performed quarterly.

5.2. System and Application Backup Strategy

  • Virtual Machines (VMs): Image-based backups of critical VMs taken [e.g., daily/hourly] with snapshots for rapid recovery.
  • Databases: Regular database dumps and transaction log backups.
  • Application Configurations: Configuration files, registry settings, and application-specific data backed up alongside application data.
  • Operating Systems: Baseline OS images maintained for rapid deployment.
  • Network Device Configurations: Regular backups of router, switch, and firewall configurations.

5.3. Data Recovery Procedures

Detailed, step-by-step procedures for restoring data from backups will be maintained in a separate runbook (Appendix B) and include:

  1. Identify Required Data/System: Determine the specific data or system to be restored and the last known good backup.
  2. Access Backup Repository: Connect to the appropriate backup storage (on-site, off-site, cloud).
  3. Initiate Restore Process: Use backup software to initiate the restore.
  4. Verify Integrity: Conduct checksums, log analysis, and application-level tests to ensure data integrity and functionality.
  5. Validation: Involve application owners and end-users in validating the restored data/system.

6. Failover and Redundancy Procedures

This section details how systems and applications will be transitioned from the primary site to a secondary recovery site or alternative infrastructure.

6.1. Infrastructure Redundancy

  • Primary Site: [Describe primary data center setup, e.g., active-active clusters, redundant power/network].
  • Recovery Site: [Describe recovery site, e.g., warm standby data center, cloud-based DRaaS].

* Warm Standby: Key systems are partially running and ready to take over with minimal data synchronization. This allows for RTO targets in the 2-4 hour range.

* Cloud-based DRaaS: Utilization of [Specify provider, e.g., Azure Site Recovery, AWS DR] for replication and orchestration of failover for critical VMs and applications.

  • Network Redundancy: Redundant internet service providers (ISPs), VPNs for remote access, and redundant network paths within the data centers.

6.2. Application Failover Procedures

  1. Declaration of Disaster: DRP Coordinator officially declares a disaster based on predefined criteria.
  2. Activate Recovery Site: Power on and initialize infrastructure at the recovery site (if not already warm standby).
  3. Network Reconfiguration:

* Update DNS records to point to the recovery site IP addresses (TTL will be set to [e.g., 5 minutes] for faster propagation).

* Reconfigure VPNs or direct connect links to the recovery site.

* Adjust firewall rules as needed.

  1. Database Failover/Restore:

* Perform database failover to the replica at the recovery site or restore from the latest backup.

* Verify database consistency and availability.

  1. Application Deployment/Activation:

* Deploy or activate applications on the recovered servers/VMs at the recovery site.

* Configure application settings to connect to the recovered databases and other services.

  1. Service Verification:

* Perform comprehensive functionality tests for all critical applications.

* Conduct user acceptance testing (UAT) with key business users.

  1. Traffic Redirection: Once verified, redirect user traffic to the recovery site.

6.3. Manual vs. Automated Failover

  • Automated Failover: For Tier 0 systems, automated failover mechanisms (e.g., database mirroring, VM replication with orchestration tools) are preferred to achieve minimal RTO/RPO.
  • Manual Failover: For Tier 1 and 2 systems, detailed manual failover steps will be documented in runbooks (Appendix B). The DRT will execute these steps under the guidance of the Incident Response Lead.

7. Incident Response and Crisis Management

7.1. Detection and Assessment

  • Monitoring Systems: Utilize [Specify tools, e.g., Nagios, SolarWinds, cloud monitoring] to detect system outages, performance degradation, and security incidents.
  • Alerting Mechanisms: Automated alerts via SMS, email, and PagerDuty will notify the DRT of critical events.
  • Initial Assessment: The Incident Response Lead will quickly assess the scope and impact of the incident to determine if it meets disaster declaration criteria.

7.2. Activation Criteria

A disaster will be declared, and the DRP activated, if:

  • Loss of primary data center or critical infrastructure for more than [e.g., 1 hour].
  • Major data corruption or loss impacting Tier 0/1 systems.
  • Widespread service outage impacting core business operations beyond RTO targets.
  • Significant security breach compromising critical systems/data.
  • Unavailability of key personnel or resources required for normal operations.

7.3. Incident Response Team Activation

  1. DRP Coordinator Notification: Incident Response Lead notifies the DRP Coordinator.
  2. Disaster Declaration: DRP Coordinator officially declares a disaster.
  3. Team Assembly: DRT members are immediately convened (virtually or physically) and assigned specific tasks based on their roles.
  4. Command Center: A virtual or physical command center will be established for coordination (e.g., Microsoft Teams, dedicated conference bridge).

7.4. Escalation Matrix

A clear escalation path will be followed:

  • Level 1 (Operational Impact): Incident Response Lead -> DRP Coordinator.
  • Level 2 (Business Impact): DRP Coordinator -> Executive Management Team.
  • Level 3 (Reputational/Legal Impact): Executive Management Team -> Legal, PR, Board of Directors.

8. Communication Plan

Effective communication is paramount during a disaster to manage expectations, provide

gemini Output

Disaster Recovery Plan

Document Version: 1.0

Date: October 26, 2023

Prepared By: PantheraHive Solutions

Approved By: [Client Management Representative]


1. Executive Summary

This Disaster Recovery Plan (DRP) outlines the strategies, procedures, and responsibilities necessary to ensure the swift and effective recovery of critical IT systems and data following a disruptive event. The primary objective is to minimize downtime, data loss, and business impact, enabling [Organization Name] to restore essential operations within predefined Recovery Time Objectives (RTOs) and Recovery Point Objectives (RPOs). This plan encompasses backup strategies, failover procedures, communication protocols, and a rigorous testing schedule to maintain operational resilience.

2. Introduction

2.1. Purpose

The purpose of this DRP is to provide a structured approach for responding to and recovering from various disaster scenarios that could disrupt [Organization Name]'s IT infrastructure and business operations. It serves as a comprehensive guide for the Disaster Recovery Team and other stakeholders during an emergency.

2.2. Scope

This DRP covers the recovery of critical IT infrastructure, applications, and data essential for [Organization Name]'s core business functions. This includes, but is not limited to:

  • Primary Data Center (or main server room) infrastructure
  • Cloud-based services and applications (if applicable)
  • Network connectivity (LAN/WAN)
  • Key business applications (e.g., ERP, CRM, Financial Systems, Email)
  • Data repositories (databases, file shares)
  • End-user computing environments (as needed for critical functions)

2.3. Objectives

  • Minimize the financial and operational impact of a disaster.
  • Ensure the safety of personnel during and after a disaster.
  • Restore critical business functions and IT services within acceptable RTOs.
  • Recover data with minimal loss, adhering to defined RPOs.
  • Provide clear communication channels to all stakeholders during a disaster.
  • Maintain the integrity and security of recovered data and systems.
  • Comply with relevant regulatory and contractual obligations.

2.4. Assumptions

  • A Disaster Recovery Team (DRT) is established and trained.
  • Off-site backup facilities and/or cloud-based recovery sites are available and configured.
  • Necessary hardware, software licenses, and network infrastructure are available at the recovery site or can be procured within recovery timelines.
  • Key personnel are available and accessible during a disaster.
  • All critical systems and data have been identified and documented.

3. Disaster Recovery Team (DRT)

The DRT is responsible for executing this plan. Roles and responsibilities are assigned to ensure a coordinated and efficient response.

3.1. Roles and Responsibilities

| Role | Primary Responsibility | Backup Contact |

| :------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------- |

| DR Coordinator | Overall management of the disaster recovery effort, plan activation, external communications, liaison with senior management. | [Backup Coordinator] |

| IT Infrastructure Lead | Recovery of network, server hardware, virtualization platforms, storage. Coordination with vendors for infrastructure. | [Backup IT Infra Lead] |

| Application Lead | Recovery and configuration of critical business applications, database restoration, application testing. | [Backup App Lead] |

| Data & Security Lead | Data restoration from backups, ensuring data integrity and security, managing access controls during recovery. | [Backup Data Lead] |

| Communications Lead | Managing all internal and external communications, drafting messages, maintaining contact lists. | [Backup Comms Lead] |

| Business Unit Leads | Verifying restored business functionality, user acceptance testing, coordinating business operations at the recovery site. (Representing Finance, Sales, Operations, etc.) | [Backup BU Leads] |

3.2. Contact Information

A detailed contact list for all DRT members, their backups, and key external contacts (vendors, emergency services) will be maintained in Appendix A: Contact Lists and stored securely off-site.

4. Business Impact Analysis (BIA) Summary & Recovery Objectives

Based on the Business Impact Analysis (BIA), critical systems and data have been identified, and specific Recovery Time Objectives (RTOs) and Recovery Point Objectives (RPOs) have been established.

4.1. Critical Systems/Applications Identification

The following is a summary of identified critical systems and their associated business functions:

| System/Application | Business Function(s) | Criticality Level |

| :------------------------- | :----------------------------------------------------- | :---------------- |

| Email System (e.g., Exchange/O365) | Internal & External Communications, Collaboration | Critical |

| ERP System (e.g., SAP/Oracle) | Order Processing, Inventory, Finance, Production | Critical |

| CRM System (e.g., Salesforce) | Customer Management, Sales Operations | High |

| Financial System (e.g., QuickBooks) | Accounting, Payroll, Billing | Critical |

| File Servers/SharePoint| Document Storage, Collaboration | High |

| Web Server (Public-facing) | Online Presence, Customer Portals | Medium |

| Internal Applications | [Specify other key internal apps] | [High/Medium/Low] |

4.2. Recovery Time Objectives (RTOs)

RTO defines the maximum tolerable duration that a system or application can be down after a disaster.

  • Critical Systems (Tier 1): 4-8 hours (e.g., ERP, Financials, Primary Email)
  • High Priority Systems (Tier 2): 12-24 hours (e.g., CRM, File Servers, Key Internal Apps)
  • Medium Priority Systems (Tier 3): 24-48 hours (e.g., Public Website, Non-critical Internal Apps)
  • Low Priority Systems (Tier 4): 48-72+ hours (e.g., Development environments, historical archives)

4.3. Recovery Point Objectives (RPOs)

RPO defines the maximum tolerable period in which data might be lost from an IT service due to a major incident.

  • Critical Systems (Tier 1): 0-1 hour (e.g., Transactional databases requiring near real-time replication)
  • High Priority Systems (Tier 2): 4-6 hours (e.g., Daily backups with frequent transaction log shipping)
  • Medium Priority Systems (Tier 3): 12-24 hours (e.g., Daily backups)
  • Low Priority Systems (Tier 4): 24 hours (e.g., Daily backups or less frequent)

5. Backup and Data Recovery Strategy

A robust backup strategy is fundamental to achieving RPOs and ensuring data availability.

5.1. Data Classification

All data is classified based on its criticality, sensitivity, and regulatory requirements (e.g., Public, Internal, Confidential, Restricted). This classification dictates backup frequency, retention, and security measures.

5.2. Backup Methodologies

  • Full Backups: Complete copy of all selected data. Performed weekly for all critical systems.
  • Incremental Backups: Copies only data that has changed since the last full or incremental backup. Performed daily for critical and high-priority systems.
  • Differential Backups: Copies all data that has changed since the last full backup. Performed daily for medium-priority systems.
  • Database Transaction Logs: Continuously backed up or replicated for critical databases to ensure near-zero data loss (RPO < 1 hour).
  • Snapshots: Used for virtual machines and storage arrays for rapid point-in-time recovery.

5.3. Backup Frequency and Retention

| Data Criticality | Backup Type | Frequency | Retention Policy |

| :--------------- | :------------------- | :---------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |

| Critical | Full, Incremental, Logs | Weekly Full, Daily Incremental, Hourly Logs | 7 daily incrementals, 4 weekly fulls, 12 monthly fulls, 7 yearly fulls (stored off-site). Transaction logs retained as per RPO. |

| High | Full, Incremental | Weekly Full, Daily Incremental | 7 daily incrementals, 4 weekly fulls, 6 monthly fulls (stored off-site). |

| Medium | Full, Differential | Weekly Full, Daily Differential | 7 daily differentials, 4 weekly fulls (stored off-site). |

| Low | Full | Weekly Full | 4 weekly fulls (stored off-site). |

5.4. Backup Storage Locations

  • On-site Storage: Short-term backups (e.g., daily incrementals) stored on local Network Attached Storage (NAS) or Storage Area Network (SAN) for fast recovery of minor incidents.
  • Off-site Storage: All full and long-term retention backups are replicated or moved to a secure, geographically separate location (e.g., cloud storage, dedicated DR site, secure vault) at least 50 miles away from the primary site.
  • Cloud Backup: Utilizing [Cloud Provider, e.g., Azure Backup, AWS S3, Google Cloud Storage] for secure, scalable, and redundant off-site storage. Data is encrypted in transit and at rest.

5.5. Data Encryption and Security

  • All backup data is encrypted using AES-256 encryption both in transit and at rest.
  • Access to backup systems and storage locations is restricted to authorized DRT members and managed through robust access control policies (e.g., MFA).
  • Regular vulnerability assessments and penetration testing are performed on backup infrastructure.

5.6. Restore Procedures

Detailed, step-by-step data restore procedures for all critical systems are documented in Appendix F: System-Specific Recovery Runbooks. General steps include:

  1. Identify the required data and restoration point (timestamp).
  2. Locate the appropriate backup media/cloud snapshot.
  3. Perform a test restore to a non-production environment (if feasible).
  4. Execute the restore to the recovery environment.
  5. Verify data integrity and completeness.

6. Disaster Detection and Declaration

6.1. Criteria for Disaster Declaration

A disaster is declared when a disruptive event significantly impacts critical business operations and cannot be resolved through normal operational recovery procedures. Examples include:

  • Complete loss of primary data center functionality (e.g., fire, flood, prolonged power outage).
  • Widespread network outage affecting critical systems.
  • Major cyber-attack (e.g., ransomware, data breach) rendering systems inoperable or compromised.
  • Destruction or inaccessibility of key facilities.
  • Loss of critical IT personnel.

6.2. Notification Procedures

  1. Detection: Monitoring systems (e.g., network monitoring, server alerts, security incident detection) or direct observation.
  2. Initial Assessment: IT Operations or the first responder assesses the scope and severity of the incident.
  3. Reporting: Incident reported immediately to the DR Coordinator and IT Leadership.
  4. Declaration Decision: DR Coordinator, in consultation with senior management, declares a disaster based on established criteria.
  5. DRT Notification: The DR Coordinator activates the DRT via pre-defined communication channels (e.g., mass notification system, emergency call tree).

6.3. Escalation Matrix

| Timeframe After Detection | Action | Responsible Party |

| :------------------------ | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :---------------- |

| 0-15 minutes | Initial incident detection and assessment. Notify DR Coordinator and IT Leadership. | IT Operations |

| 15-30 minutes | DR Coordinator reviews incident, makes disaster declaration decision. Notifies DRT. Begins initial communication to senior management. | DR Coordinator |

| 30-60 minutes | DRT members confirm receipt of notification and begin mobilization. DR Coordinator provides initial situation report to executive leadership and key business unit heads. | DR Coordinator, DRT |

| 1-2 hours | DRT convenes (physically or virtually) to review the situation, confirm recovery strategy, and assign tasks. Communications Lead prepares initial internal/external statements. | DRT |

7. Disaster Recovery Procedures (Failover & Failback)

This section outlines the general phases of disaster recovery. Detailed, system-specific recovery steps are documented in Appendix F: System-Specific Recovery Runbooks.

7.1. Phase 1: Activation & Assessment

  1. Initial Damage Assessment:

* Assess the extent of physical damage (if applicable) and impact on IT infrastructure.

* Determine which systems are affected and the estimated duration of outage.

* Confirm the primary site is truly unavailable and recovery at the primary site is not feasible within RTOs.

  1. DRP Activation:

* DR Coordinator officially declares a disaster and activates the DRP.

* All DRT members are notified and instructed to proceed to the designated command center or remote work locations.

  1. Team Mobilization:

* DRT members confirm their availability and readiness.

* Establish communication channels for the DRT (e.g., conference bridge, secure chat).

* Review the latest version of the DRP and specific recovery runbooks.

7.2. Phase 2: Recovery & Restoration (Failover)

  1. Infrastructure Recovery:

* Network: Establish network connectivity at the recovery site (VPNs, direct connections, DNS updates).

* Servers/Virtualization: Provision or activate recovery servers/VMs at the secondary site or cloud DR environment.

* Storage: Ensure access to replicated data volumes or restore from backups to recovery storage.

  1. Application Recovery:

* Order of Restoration: Restore applications based on their dependencies and criticality (e.g., Active Directory/Identity Services first, then databases, then core business applications).

gemini Output

Disaster Recovery Plan (DRP)

Version: 1.0

Date: October 26, 2023

Prepared For: [Your Organization Name]

Prepared By: PantheraHive


1. Executive Summary

This Disaster Recovery Plan (DRP) outlines the procedures, strategies, and resources necessary to recover critical IT systems and data in the event of a disruptive incident or disaster. The primary objective is to minimize downtime, prevent data loss, and ensure the continuity of essential business operations. This plan details Recovery Time Objectives (RTOs) and Recovery Point Objectives (RPOs) for critical systems, defines backup strategies, outlines failover procedures, establishes communication protocols, and schedules regular testing to ensure readiness.

2. Purpose and Scope

Purpose:

To provide a structured and actionable framework for responding to and recovering from various disaster scenarios, ensuring the rapid restoration of critical business functions and data integrity.

Scope:

This DRP covers all critical IT infrastructure, applications, and data identified as essential for the ongoing operation of [Your Organization Name]. This includes, but is not limited to:

  • Core business applications (e.g., ERP, CRM, Financial Systems)
  • Database servers
  • Web servers
  • Email services
  • Network infrastructure
  • Data storage and file shares
  • Cloud-based services deemed critical

Out of Scope:

  • Physical security protocols (covered by separate Security Plan)
  • Business Continuity Planning (BCP) for non-IT related business processes (though closely integrated)

3. Disaster Recovery Team and Roles

A dedicated Disaster Recovery Team (DRT) is established with clear roles and responsibilities to manage and execute the recovery process.

DRT Lead (Incident Commander):

  • Role: Overall command and control of the recovery effort. Declares disaster, authorizes DRP activation.
  • Responsibilities: Coordinate DRT activities, communicate with executive management, ensure adherence to the DRP.
  • Primary Contact: [Name/Title], [Phone], [Email]
  • Alternate Contact: [Name/Title], [Phone], [Email]

Infrastructure Recovery Lead:

  • Role: Responsible for restoring network, server, and virtual infrastructure.
  • Responsibilities: Activate recovery sites, configure network connectivity, provision compute resources.
  • Primary Contact: [Name/Title], [Phone], [Email]
  • Alternate Contact: [Name/Title], [Phone], [Email]

Application & Data Recovery Lead:

  • Role: Responsible for restoring critical applications and associated data.
  • Responsibilities: Restore databases, deploy applications, validate application functionality, data integrity checks.
  • Primary Contact: [Name/Title], [Phone], [Email]
  • Alternate Contact: [Name/Title], [Phone], [Email]

Communications Lead:

  • Role: Manages all internal and external communications during a disaster.
  • Responsibilities: Draft and disseminate status updates, manage media inquiries, coordinate with stakeholders.
  • Primary Contact: [Name/Title], [Phone], [Email]
  • Alternate Contact: [Name/Title], [Phone], [Email]

Support Personnel:

  • Various IT personnel and business unit representatives will assist under the direction of the DRT Leads.

4. Critical Systems Inventory, RTO, and RPO Targets

This section identifies critical systems and defines their Recovery Time Objectives (RTO) and Recovery Point Objectives (RPO).

  • Recovery Time Objective (RTO): The maximum tolerable duration of time that a computer system, network, or application can be down after a disaster or disruption without causing significant damage to the business.
  • Recovery Point Objective (RPO): The maximum tolerable amount of data (measured in time) that can be lost from an IT service due to a major incident. It defines the point in time to which data must be recovered.

| System/Application ID | System/Application Name | Owner Dept. | Description | RTO Target | RPO Target | Dependencies |

| :-------------------- | :---------------------- | :---------- | :---------- | :--------- | :--------- | :----------- |

| APP-001 | ERP System (e.g., SAP) | Finance | Core financial and operational management. | 4 Hours | 1 Hour | DB-001, NET-001 |

| APP-002 | CRM System (e.g., Salesforce) | Sales | Customer relationship management and sales operations. | 8 Hours | 4 Hours | DB-002, NET-001 |

| APP-003 | Email Service (e.g., O365, Exchange) | IT | Internal and external communication. | 4 Hours | 1 Hour | NET-001, AD-001 |

| DB-001 | SQL Database (ERP) | IT | Backend database for ERP system. | 2 Hours | 15 Mins | SRV-001, STR-001 |

| SRV-001 | ERP Application Servers | IT | Hosting ERP application components. | 3 Hours | 1 Hour | DB-001, NET-001 |

| NET-001 | Core Network Services | IT | DNS, DHCP, VPN, Internet Access. | 2 Hours | 0 (HA) | ISP-001, PWR-001 |

| FS-001 | File Servers/Shares | All | Centralized document storage. | 12 Hours | 4 Hours | STR-001, NET-001 |

| AD-001 | Active Directory | IT | User authentication and authorization. | 4 Hours | 1 Hour | SRV-002, NET-001 |

| Add more as needed | | | | | | |

5. Backup and Data Recovery Strategies

A robust backup strategy is critical for achieving RPOs and ensuring data recoverability.

5.1. Data Classification:

All data is classified to determine appropriate backup frequency, retention, and storage location.

  • Critical Data: Data essential for business operations. RPO: < 4 hours. Retention: 7 years.
  • Important Data: Data necessary for business operations, but can tolerate some delay. RPO: < 24 hours. Retention: 3 years.
  • Non-Critical Data: Data that can be recreated or has minimal impact if lost. RPO: > 24 hours. Retention: 1 year.

5.2. Backup Types and Frequencies:

| System/Data Type | Backup Type | Frequency | Retention Policy | Storage Location | Encryption | Verification |

| :--------------- | :---------- | :-------- | :--------------- | :--------------- | :--------- | :----------- |

| Critical DBs (e.g., DB-001) | Full, Differential, Transaction Logs | Daily Full, Hourly Diff, 15-min Logs | 7 days on-site, 30 days off-site, 7 years archival | Primary Data Center (PDC), Cloud (Azure/AWS) | In-transit & At-rest | Weekly Restore Test |

| Critical Apps (e.g., SRV-001) | Full (VM Image), Incremental | Daily Full, Hourly Incremental | 7 days on-site, 30 days off-site | PDC, Cloud (Azure/AWS) | In-transit & At-rest | Monthly VM Boot Test |

| File Servers (e.g., FS-001) | Full, Incremental | Daily Full, Hourly Incremental | 30 days on-site, 90 days off-site | PDC, Cloud (Azure/AWS) | In-transit & At-rest | Quarterly File Restore Test |

| Active Directory (AD-001) | System State Backup | Daily | 30 days on-site, 90 days off-site | PDC, Cloud (Azure/AWS) | In-transit & At-rest | Semi-Annual Restore Test |

| Cloud-Native Data (e.g., O365) | Native Cloud Backup/Third-Party | Continuous/Daily | As per vendor/SaaS agreement + 3rd party retention | Cloud Vendor Region, Third-Party Backup | At-rest | Quarterly Review |

| Add more as needed | | | | | | |

5.3. Backup Storage Locations:

  • On-site: Redundant storage arrays within the primary data center for immediate recovery.
  • Off-site: Secure, geographically separate location for critical backups (e.g., secondary data center or secure vault).
  • Cloud: Utilize cloud storage (e.g., AWS S3, Azure Blob Storage) for long-term retention and off-site redundancy, leveraging geo-redundant options.

5.4. Encryption:

All data backups are encrypted both in transit (during transfer to storage) and at rest (when stored). Encryption keys are securely managed and stored separately from the backup data.

5.5. Backup Verification:

Regular verification of backups is performed to ensure data integrity and recoverability. This includes:

  • Automated daily checks for backup job completion.
  • Monthly spot checks of random files and databases.
  • Quarterly full restoration tests of critical systems and data to a segregated test environment.

6. Failover and Recovery Procedures

This section details the step-by-step procedures for declaring a disaster, activating recovery services, and restoring operations.

6.1. Disaster Declaration and Activation:

  1. Detection: An incident is detected (e.g., system outage, facility loss, cyberattack).
  2. Assessment: DRT Lead, in coordination with IT Operations, assesses the incident's impact and potential duration.
  3. Declaration: If the incident meets the criteria for a disaster (e.g., prolonged outage exceeding RTO thresholds, loss of primary data center), the DRT Lead declares a disaster.
  4. Notification: The DRT Lead notifies executive management and activates the DRT.
  5. DRP Activation: The DRT assembles (physically or virtually) and initiates the DRP, referencing this document and system-specific runbooks.

6.2. Recovery Site Strategy:

[Your Organization Name] utilizes a [Warm/Hot/Cold/Cloud-based DRaaS] recovery site strategy.

  • [Example for Cloud-based DRaaS]: Leveraging a cloud provider (e.g., Azure Site Recovery, AWS CloudEndure) for replication of critical VMs and data to a secondary region. This allows for rapid provisioning of compute resources and network failover in the event of a primary site failure.

6.3. General Recovery Steps:

  1. Establish Communications: Ensure DRT can communicate internally and externally.
  2. Assess Damage and Confirm Scope: Re-evaluate the disaster's impact on critical systems.
  3. Activate Recovery Site:

* Initiate failover procedures for replicated VMs/databases to the cloud DR region.

* Configure network connectivity (VPNs, DNS updates) to direct traffic to the recovery site.

  1. Restore Critical Infrastructure (NET-001, AD-001):

* Verify network services (DNS, DHCP, routing) are operational at the recovery site.

* Restore Active Directory services if impacted, ensuring replication is healthy.

  1. Restore Critical Databases (DB-001, DB-002):

* Initiate database restoration from the most recent valid backup or replicated data.

* Perform integrity checks and apply transaction logs to achieve RPO.

  1. Restore Critical Applications (APP-001, APP-002, APP-003):

* Deploy application servers and components at the recovery site.

* Connect applications to restored databases.

* Perform functional testing of applications.

  1. Restore File Services (FS-001):

* Restore critical file shares from backup.

* Verify access and data integrity.

  1. User Access and Validation:

* Communicate to users that services are available at the recovery site.

* Conduct user acceptance testing (UAT) for critical functionalities.

  1. Monitor and Stabilize:

* Continuously monitor system performance and health at the recovery site.

* Address any issues that arise.

6.4. System-Specific Recovery Procedures (Example - ERP System):

  • System: APP-001 (ERP System)
  • Dependencies: DB-001 (SQL Database), SRV-001 (App Servers), NET-001 (Network)
  • RTO: 4 Hours, RPO: 1 Hour
  1. Pre-requisites: Ensure NET-001 and AD-001 are operational at the recovery site.
  2. Database Failover/Restore (DB-001):

* If using database replication (e.g., SQL AlwaysOn), initiate failover to the secondary replica in the DR region.

* If restoring from backup, restore the latest full backup, apply differential backups, and then transaction logs to achieve the 1-hour RPO.

* Verify database integrity and accessibility.

  1. Application Server Recovery (SRV-001):

* Initiate VM failover for ERP application servers to the DR region using [DRaaS tool, e.g., Azure Site Recovery].

* Alternatively, provision new servers in the DR region and deploy the latest application images/code.

* Configure application servers to connect to the recovered DB-001.

  1. Application Configuration:

* Update DNS records or load balancer configurations to direct user traffic to the recovered ERP application servers.

* Verify all application services are started and running.

  1. Functional Testing:

* Perform key transaction tests (e.g., create order, process invoice, run report).

* Engage key business users for UAT.

  1. Failback (Post-Disaster):

* Once the primary site is restored and stable, replicate data changes back to the primary site.

* Schedule a planned failback window to minimize disruption.

* Reverse DNS/load balancer changes to point back to the primary site.

* Monitor primary site for stability.

(Detailed runbooks for each critical system will be maintained as separate appendices to this DRP.)

7. Communication Plan

Effective communication is paramount during a disaster to manage expectations, coordinate efforts, and maintain trust.

7.1. Internal Communication:

  • DRT Members: Dedicated conference bridge, secure chat channel (e.g., Microsoft Teams, Slack), SMS.

* Frequency: Continuous updates during active recovery.

  • Employees: Email, internal portal/intranet, dedicated status page, SMS alerts.

* Frequency: Initial notification of outage, regular status updates (e.g., every 2-4 hours), notification of service restoration.

  • Executive Management: Direct phone calls, email, dedicated briefing calls.

* Frequency: Initial notification, key decision points, daily

disaster_recovery_plan.md
Download as Markdown
Copy all content
Full output as text
Download ZIP
IDE-ready project ZIP
Copy share link
Permanent URL for this run
Get Embed Code
Embed this result on any website
Print / Save PDF
Use browser print dialog
"); var hasSrcMain=Object.keys(extracted).some(function(k){return k.indexOf("src/main")>=0;}); if(!hasSrcMain) zip.file(folder+"src/main."+ext,"import React from 'react' import ReactDOM from 'react-dom/client' import App from './App' import './index.css' ReactDOM.createRoot(document.getElementById('root')!).render( ) "); var hasSrcApp=Object.keys(extracted).some(function(k){return k==="src/App."+ext||k==="App."+ext;}); if(!hasSrcApp) zip.file(folder+"src/App."+ext,"import React from 'react' import './App.css' function App(){ return(

"+slugTitle(pn)+"

Built with PantheraHive BOS

) } export default App "); zip.file(folder+"src/index.css","*{margin:0;padding:0;box-sizing:border-box} body{font-family:system-ui,-apple-system,sans-serif;background:#f0f2f5;color:#1a1a2e} .app{min-height:100vh;display:flex;flex-direction:column} .app-header{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:40px} h1{font-size:2.5rem;font-weight:700} "); zip.file(folder+"src/App.css",""); zip.file(folder+"src/components/.gitkeep",""); zip.file(folder+"src/pages/.gitkeep",""); zip.file(folder+"src/hooks/.gitkeep",""); Object.keys(extracted).forEach(function(p){ var fp=p.startsWith("src/")?p:"src/"+p; zip.file(folder+fp,extracted[p]); }); zip.file(folder+"README.md","# "+slugTitle(pn)+" Generated by PantheraHive BOS. ## Setup ```bash npm install npm run dev ``` ## Build ```bash npm run build ``` ## Open in IDE Open the project folder in VS Code or WebStorm. "); zip.file(folder+".gitignore","node_modules/ dist/ .env .DS_Store *.local "); } /* --- Vue (Vite + Composition API + TypeScript) --- */ function buildVue(zip,folder,app,code,panelTxt){ var pn=pkgName(app); var C=cc(pn); var extracted=extractCode(panelTxt); zip.file(folder+"package.json",'{ "name": "'+pn+'", "version": "0.0.0", "type": "module", "scripts": { "dev": "vite", "build": "vue-tsc -b && vite build", "preview": "vite preview" }, "dependencies": { "vue": "^3.5.13", "vue-router": "^4.4.5", "pinia": "^2.3.0", "axios": "^1.7.9" }, "devDependencies": { "@vitejs/plugin-vue": "^5.2.1", "typescript": "~5.7.3", "vite": "^6.0.5", "vue-tsc": "^2.2.0" } } '); zip.file(folder+"vite.config.ts","import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' import { resolve } from 'path' export default defineConfig({ plugins: [vue()], resolve: { alias: { '@': resolve(__dirname,'src') } } }) "); zip.file(folder+"tsconfig.json",'{"files":[],"references":[{"path":"./tsconfig.app.json"},{"path":"./tsconfig.node.json"}]} '); zip.file(folder+"tsconfig.app.json",'{ "compilerOptions":{ "target":"ES2020","useDefineForClassFields":true,"module":"ESNext","lib":["ES2020","DOM","DOM.Iterable"], "skipLibCheck":true,"moduleResolution":"bundler","allowImportingTsExtensions":true, "isolatedModules":true,"moduleDetection":"force","noEmit":true,"jsxImportSource":"vue", "strict":true,"paths":{"@/*":["./src/*"]} }, "include":["src/**/*.ts","src/**/*.d.ts","src/**/*.tsx","src/**/*.vue"] } '); zip.file(folder+"env.d.ts","/// "); zip.file(folder+"index.html"," "+slugTitle(pn)+"
"); var hasMain=Object.keys(extracted).some(function(k){return k==="src/main.ts"||k==="main.ts";}); if(!hasMain) zip.file(folder+"src/main.ts","import { createApp } from 'vue' import { createPinia } from 'pinia' import App from './App.vue' import './assets/main.css' const app = createApp(App) app.use(createPinia()) app.mount('#app') "); var hasApp=Object.keys(extracted).some(function(k){return k.indexOf("App.vue")>=0;}); if(!hasApp) zip.file(folder+"src/App.vue"," "); zip.file(folder+"src/assets/main.css","*{margin:0;padding:0;box-sizing:border-box}body{font-family:system-ui,sans-serif;background:#fff;color:#213547} "); zip.file(folder+"src/components/.gitkeep",""); zip.file(folder+"src/views/.gitkeep",""); zip.file(folder+"src/stores/.gitkeep",""); Object.keys(extracted).forEach(function(p){ var fp=p.startsWith("src/")?p:"src/"+p; zip.file(folder+fp,extracted[p]); }); zip.file(folder+"README.md","# "+slugTitle(pn)+" Generated by PantheraHive BOS. ## Setup ```bash npm install npm run dev ``` ## Build ```bash npm run build ``` Open in VS Code or WebStorm. "); zip.file(folder+".gitignore","node_modules/ dist/ .env .DS_Store *.local "); } /* --- Angular (v19 standalone) --- */ function buildAngular(zip,folder,app,code,panelTxt){ var pn=pkgName(app); var C=cc(pn); var sel=pn.replace(/_/g,"-"); var extracted=extractCode(panelTxt); zip.file(folder+"package.json",'{ "name": "'+pn+'", "version": "0.0.0", "scripts": { "ng": "ng", "start": "ng serve", "build": "ng build", "test": "ng test" }, "dependencies": { "@angular/animations": "^19.0.0", "@angular/common": "^19.0.0", "@angular/compiler": "^19.0.0", "@angular/core": "^19.0.0", "@angular/forms": "^19.0.0", "@angular/platform-browser": "^19.0.0", "@angular/platform-browser-dynamic": "^19.0.0", "@angular/router": "^19.0.0", "rxjs": "~7.8.0", "tslib": "^2.3.0", "zone.js": "~0.15.0" }, "devDependencies": { "@angular-devkit/build-angular": "^19.0.0", "@angular/cli": "^19.0.0", "@angular/compiler-cli": "^19.0.0", "typescript": "~5.6.0" } } '); zip.file(folder+"angular.json",'{ "$schema": "./node_modules/@angular/cli/lib/config/schema.json", "version": 1, "newProjectRoot": "projects", "projects": { "'+pn+'": { "projectType": "application", "root": "", "sourceRoot": "src", "prefix": "app", "architect": { "build": { "builder": "@angular-devkit/build-angular:application", "options": { "outputPath": "dist/'+pn+'", "index": "src/index.html", "browser": "src/main.ts", "tsConfig": "tsconfig.app.json", "styles": ["src/styles.css"], "scripts": [] } }, "serve": {"builder":"@angular-devkit/build-angular:dev-server","configurations":{"production":{"buildTarget":"'+pn+':build:production"},"development":{"buildTarget":"'+pn+':build:development"}},"defaultConfiguration":"development"} } } } } '); zip.file(folder+"tsconfig.json",'{ "compileOnSave": false, "compilerOptions": {"baseUrl":"./","outDir":"./dist/out-tsc","forceConsistentCasingInFileNames":true,"strict":true,"noImplicitOverride":true,"noPropertyAccessFromIndexSignature":true,"noImplicitReturns":true,"noFallthroughCasesInSwitch":true,"paths":{"@/*":["src/*"]},"skipLibCheck":true,"esModuleInterop":true,"sourceMap":true,"declaration":false,"experimentalDecorators":true,"moduleResolution":"bundler","importHelpers":true,"target":"ES2022","module":"ES2022","useDefineForClassFields":false,"lib":["ES2022","dom"]}, "references":[{"path":"./tsconfig.app.json"}] } '); zip.file(folder+"tsconfig.app.json",'{ "extends":"./tsconfig.json", "compilerOptions":{"outDir":"./dist/out-tsc","types":[]}, "files":["src/main.ts"], "include":["src/**/*.d.ts"] } '); zip.file(folder+"src/index.html"," "+slugTitle(pn)+" "); zip.file(folder+"src/main.ts","import { bootstrapApplication } from '@angular/platform-browser'; import { appConfig } from './app/app.config'; import { AppComponent } from './app/app.component'; bootstrapApplication(AppComponent, appConfig) .catch(err => console.error(err)); "); zip.file(folder+"src/styles.css","* { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: system-ui, -apple-system, sans-serif; background: #f9fafb; color: #111827; } "); var hasComp=Object.keys(extracted).some(function(k){return k.indexOf("app.component")>=0;}); if(!hasComp){ zip.file(folder+"src/app/app.component.ts","import { Component } from '@angular/core'; import { RouterOutlet } from '@angular/router'; @Component({ selector: 'app-root', standalone: true, imports: [RouterOutlet], templateUrl: './app.component.html', styleUrl: './app.component.css' }) export class AppComponent { title = '"+pn+"'; } "); zip.file(folder+"src/app/app.component.html","

"+slugTitle(pn)+"

Built with PantheraHive BOS

"); zip.file(folder+"src/app/app.component.css",".app-header{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:60vh;gap:16px}h1{font-size:2.5rem;font-weight:700;color:#6366f1} "); } zip.file(folder+"src/app/app.config.ts","import { ApplicationConfig, provideZoneChangeDetection } from '@angular/core'; import { provideRouter } from '@angular/router'; import { routes } from './app.routes'; export const appConfig: ApplicationConfig = { providers: [ provideZoneChangeDetection({ eventCoalescing: true }), provideRouter(routes) ] }; "); zip.file(folder+"src/app/app.routes.ts","import { Routes } from '@angular/router'; export const routes: Routes = []; "); Object.keys(extracted).forEach(function(p){ var fp=p.startsWith("src/")?p:"src/"+p; zip.file(folder+fp,extracted[p]); }); zip.file(folder+"README.md","# "+slugTitle(pn)+" Generated by PantheraHive BOS. ## Setup ```bash npm install ng serve # or: npm start ``` ## Build ```bash ng build ``` Open in VS Code with Angular Language Service extension. "); zip.file(folder+".gitignore","node_modules/ dist/ .env .DS_Store *.local .angular/ "); } /* --- Python --- */ function buildPython(zip,folder,app,code){ var title=slugTitle(app); var pn=pkgName(app); var src=code.replace(/^```[w]* ?/m,"").replace(/ ?```$/m,"").trim(); var reqMap={"numpy":"numpy","pandas":"pandas","sklearn":"scikit-learn","tensorflow":"tensorflow","torch":"torch","flask":"flask","fastapi":"fastapi","uvicorn":"uvicorn","requests":"requests","sqlalchemy":"sqlalchemy","pydantic":"pydantic","dotenv":"python-dotenv","PIL":"Pillow","cv2":"opencv-python","matplotlib":"matplotlib","seaborn":"seaborn","scipy":"scipy"}; var reqs=[]; Object.keys(reqMap).forEach(function(k){if(src.indexOf("import "+k)>=0||src.indexOf("from "+k)>=0)reqs.push(reqMap[k]);}); var reqsTxt=reqs.length?reqs.join(" "):"# add dependencies here "; zip.file(folder+"main.py",src||"# "+title+" # Generated by PantheraHive BOS print(title+" loaded") "); zip.file(folder+"requirements.txt",reqsTxt); zip.file(folder+".env.example","# Environment variables "); zip.file(folder+"README.md","# "+title+" Generated by PantheraHive BOS. ## Setup ```bash python3 -m venv .venv source .venv/bin/activate pip install -r requirements.txt ``` ## Run ```bash python main.py ``` "); zip.file(folder+".gitignore",".venv/ __pycache__/ *.pyc .env .DS_Store "); } /* --- Node.js --- */ function buildNode(zip,folder,app,code){ var title=slugTitle(app); var pn=pkgName(app); var src=code.replace(/^```[w]* ?/m,"").replace(/ ?```$/m,"").trim(); var depMap={"mongoose":"^8.0.0","dotenv":"^16.4.5","axios":"^1.7.9","cors":"^2.8.5","bcryptjs":"^2.4.3","jsonwebtoken":"^9.0.2","socket.io":"^4.7.4","uuid":"^9.0.1","zod":"^3.22.4","express":"^4.18.2"}; var deps={}; Object.keys(depMap).forEach(function(k){if(src.indexOf(k)>=0)deps[k]=depMap[k];}); if(!deps["express"])deps["express"]="^4.18.2"; var pkgJson=JSON.stringify({"name":pn,"version":"1.0.0","main":"src/index.js","scripts":{"start":"node src/index.js","dev":"nodemon src/index.js"},"dependencies":deps,"devDependencies":{"nodemon":"^3.0.3"}},null,2)+" "; zip.file(folder+"package.json",pkgJson); var fallback="const express=require("express"); const app=express(); app.use(express.json()); app.get("/",(req,res)=>{ res.json({message:""+title+" API"}); }); const PORT=process.env.PORT||3000; app.listen(PORT,()=>console.log("Server on port "+PORT)); "; zip.file(folder+"src/index.js",src||fallback); zip.file(folder+".env.example","PORT=3000 "); zip.file(folder+".gitignore","node_modules/ .env .DS_Store "); zip.file(folder+"README.md","# "+title+" Generated by PantheraHive BOS. ## Setup ```bash npm install ``` ## Run ```bash npm run dev ``` "); } /* --- Vanilla HTML --- */ function buildVanillaHtml(zip,folder,app,code){ var title=slugTitle(app); var isFullDoc=code.trim().toLowerCase().indexOf("=0||code.trim().toLowerCase().indexOf("=0; var indexHtml=isFullDoc?code:" "+title+" "+code+" "; zip.file(folder+"index.html",indexHtml); zip.file(folder+"style.css","/* "+title+" — styles */ *{margin:0;padding:0;box-sizing:border-box} body{font-family:system-ui,-apple-system,sans-serif;background:#fff;color:#1a1a2e} "); zip.file(folder+"script.js","/* "+title+" — scripts */ "); zip.file(folder+"assets/.gitkeep",""); zip.file(folder+"README.md","# "+title+" Generated by PantheraHive BOS. ## Open Double-click `index.html` in your browser. Or serve locally: ```bash npx serve . # or python3 -m http.server 3000 ``` "); zip.file(folder+".gitignore",".DS_Store node_modules/ .env "); } /* ===== MAIN ===== */ var sc=document.createElement("script"); sc.src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.10.1/jszip.min.js"; sc.onerror=function(){ if(lbl)lbl.textContent="Download ZIP"; alert("JSZip load failed — check connection."); }; sc.onload=function(){ var zip=new JSZip(); var base=(_phFname||"output").replace(/.[^.]+$/,""); var app=base.toLowerCase().replace(/[^a-z0-9]+/g,"_").replace(/^_+|_+$/g,"")||"my_app"; var folder=app+"/"; var vc=document.getElementById("panel-content"); var panelTxt=vc?(vc.innerText||vc.textContent||""):""; var lang=detectLang(_phCode,panelTxt); if(_phIsHtml){ buildVanillaHtml(zip,folder,app,_phCode); } else if(lang==="flutter"){ buildFlutter(zip,folder,app,_phCode,panelTxt); } else if(lang==="react-native"){ buildReactNative(zip,folder,app,_phCode,panelTxt); } else if(lang==="swift"){ buildSwift(zip,folder,app,_phCode,panelTxt); } else if(lang==="kotlin"){ buildKotlin(zip,folder,app,_phCode,panelTxt); } else if(lang==="react"){ buildReact(zip,folder,app,_phCode,panelTxt); } else if(lang==="vue"){ buildVue(zip,folder,app,_phCode,panelTxt); } else if(lang==="angular"){ buildAngular(zip,folder,app,_phCode,panelTxt); } else if(lang==="python"){ buildPython(zip,folder,app,_phCode); } else if(lang==="node"){ buildNode(zip,folder,app,_phCode); } else { /* Document/content workflow */ var title=app.replace(/_/g," "); var md=_phAll||_phCode||panelTxt||"No content"; zip.file(folder+app+".md",md); var h=""+title+""; h+="

"+title+"

"; var hc=md.replace(/&/g,"&").replace(//g,">"); hc=hc.replace(/^### (.+)$/gm,"

$1

"); hc=hc.replace(/^## (.+)$/gm,"

$1

"); hc=hc.replace(/^# (.+)$/gm,"

$1

"); hc=hc.replace(/**(.+?)**/g,"$1"); hc=hc.replace(/ {2,}/g,"

"); h+="

"+hc+"

Generated by PantheraHive BOS
"; zip.file(folder+app+".html",h); zip.file(folder+"README.md","# "+title+" Generated by PantheraHive BOS. Files: - "+app+".md (Markdown) - "+app+".html (styled HTML) "); } zip.generateAsync({type:"blob"}).then(function(blob){ var a=document.createElement("a"); a.href=URL.createObjectURL(blob); a.download=app+".zip"; a.click(); URL.revokeObjectURL(a.href); if(lbl)lbl.textContent="Download ZIP"; }); }; document.head.appendChild(sc); }function phShare(){navigator.clipboard.writeText(window.location.href).then(function(){var el=document.getElementById("ph-share-lbl");if(el){el.textContent="Link copied!";setTimeout(function(){el.textContent="Copy share link";},2500);}});}function phEmbed(){var runId=window.location.pathname.split("/").pop().replace(".html","");var embedUrl="https://pantherahive.com/embed/"+runId;var code='';navigator.clipboard.writeText(code).then(function(){var el=document.getElementById("ph-embed-lbl");if(el){el.textContent="Embed code copied!";setTimeout(function(){el.textContent="Get Embed Code";},2500);}});}