Disaster Recovery

From Server rental store
Revision as of 10:52, 15 April 2025 by Admin (talk | contribs) (Automated server configuration article)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

---

  1. Disaster Recovery

This article details disaster recovery strategies for a MediaWiki 1.40 installation. A robust disaster recovery plan is crucial for minimizing downtime and data loss in the event of a catastrophic event. This guide is geared towards system administrators and server engineers new to MediaWiki administration.

Understanding the Risks

Several factors can compromise a MediaWiki installation, necessitating disaster recovery procedures. These include:

  • Hardware Failure: Server crashes, disk failures, and network outages.
  • Software Corruption: Database corruption, operating system errors, or MediaWiki code issues.
  • Security Breaches: Malware infections, hacking attempts, or data breaches.
  • Natural Disasters: Fires, floods, earthquakes, and other environmental events.
  • Human Error: Accidental data deletion or misconfiguration.

Core Components of a Disaster Recovery Plan

A comprehensive plan should cover these critical aspects:

  • Backups: Regularly scheduled backups of the MediaWiki installation, including the code, images, and, most importantly, the database.
  • Replication: Maintaining a real-time or near real-time copy of the database on a separate server.
  • Redundancy: Utilizing redundant hardware and network components to eliminate single points of failure.
  • Failover: The automated or manual process of switching to a backup system in the event of a primary system failure.
  • Testing: Regularly testing the disaster recovery plan to ensure its effectiveness.

Backup Strategies

Regular backups are the cornerstone of any disaster recovery plan. Multiple backup strategies can be employed.

Database Backups

The database is the most critical component of a MediaWiki installation. Backups should occur frequently, ideally daily. Here's a typical MySQL backup procedure:

```bash mysqldump -u [username] -p[password] [database_name] > /path/to/backup/mediawiki_backup_$(date +%Y%m%d).sql ```

Backup Frequency Backup Type Retention Period
Daily Full 7 days
Weekly Full 4 weeks
Monthly Full 12 months

File Backups

Back up the entire MediaWiki installation directory, including the `images` directory and any custom extensions or skins. Tools like `rsync` or `tar` are useful for this.

Offsite Backups

Store backups in a geographically separate location to protect against site-specific disasters. Cloud storage services are a common choice. Consider using Secure Shell for secure transfer.

Database Replication

Database replication involves creating a copy of the primary database on a secondary server. This provides a hot standby that can quickly take over in case of a failure. MySQL offers several replication options:

  • Asynchronous Replication: The secondary server lags behind the primary server, but it provides minimal performance impact on the primary.
  • Semi-Synchronous Replication: The primary server waits for acknowledgment from at least one secondary server before committing a transaction, providing better data consistency.
  • Group Replication: Provides high availability and fault tolerance through a distributed consensus algorithm.
Replication Type Consistency Performance Impact Complexity
Asynchronous Lower Minimal Low
Semi-Synchronous Medium Moderate Medium
Group Replication High High High

See MySQL Replication for detailed instructions.

Failover Procedures

Failover is the process of switching to the backup system when the primary system fails. This can be automated using tools like Pacemaker or Corosync, or it can be done manually.

Automated Failover

Automated failover requires careful configuration and testing. The failover mechanism should monitor the primary server's health and automatically switch to the secondary server if a failure is detected. Consider using a Load Balancer like HAProxy to distribute traffic.

Manual Failover

Manual failover involves manually promoting the secondary server to become the primary server. This requires a trained administrator and a well-documented procedure. Steps include:

1. Stop the primary MediaWiki server. 2. Promote the secondary database server to be the primary. 3. Update the `LocalSettings.php` file on the new primary server with the correct database credentials. 4. Restart the MediaWiki server. 5. Update DNS records to point to the new primary server.

Server Configuration Specifications

The following table outlines recommended specifications for both the primary and secondary servers.

Component Primary Server Secondary Server
CPU 8 Core Processor 4 Core Processor
RAM 32 GB 16 GB
Storage 1 TB SSD 500 GB SSD
Network 1 Gbps 1 Gbps
Operating System Linux (Ubuntu, CentOS) Linux (Ubuntu, CentOS)

Testing Your Disaster Recovery Plan

Regularly testing your disaster recovery plan is crucial to ensure its effectiveness. Conduct simulated failures to verify that backups are restorable, replication is working correctly, and failover procedures are successful. Document all test results and update the plan as needed. Refer to the MediaWiki Administration documentation for further assistance. Also review Security Best Practices for preventative measures.

Related Pages


Intel-Based Server Configurations

Configuration Specifications Benchmark
Core i7-6700K/7700 Server 64 GB DDR4, NVMe SSD 2 x 512 GB CPU Benchmark: 8046
Core i7-8700 Server 64 GB DDR4, NVMe SSD 2x1 TB CPU Benchmark: 13124
Core i9-9900K Server 128 GB DDR4, NVMe SSD 2 x 1 TB CPU Benchmark: 49969
Core i9-13900 Server (64GB) 64 GB RAM, 2x2 TB NVMe SSD
Core i9-13900 Server (128GB) 128 GB RAM, 2x2 TB NVMe SSD
Core i5-13500 Server (64GB) 64 GB RAM, 2x500 GB NVMe SSD
Core i5-13500 Server (128GB) 128 GB RAM, 2x500 GB NVMe SSD
Core i5-13500 Workstation 64 GB DDR5 RAM, 2 NVMe SSD, NVIDIA RTX 4000

AMD-Based Server Configurations

Configuration Specifications Benchmark
Ryzen 5 3600 Server 64 GB RAM, 2x480 GB NVMe CPU Benchmark: 17849
Ryzen 7 7700 Server 64 GB DDR5 RAM, 2x1 TB NVMe CPU Benchmark: 35224
Ryzen 9 5950X Server 128 GB RAM, 2x4 TB NVMe CPU Benchmark: 46045
Ryzen 9 7950X Server 128 GB DDR5 ECC, 2x2 TB NVMe CPU Benchmark: 63561
EPYC 7502P Server (128GB/1TB) 128 GB RAM, 1 TB NVMe CPU Benchmark: 48021
EPYC 7502P Server (128GB/2TB) 128 GB RAM, 2 TB NVMe CPU Benchmark: 48021
EPYC 7502P Server (128GB/4TB) 128 GB RAM, 2x2 TB NVMe CPU Benchmark: 48021
EPYC 7502P Server (256GB/1TB) 256 GB RAM, 1 TB NVMe CPU Benchmark: 48021
EPYC 7502P Server (256GB/4TB) 256 GB RAM, 2x2 TB NVMe CPU Benchmark: 48021
EPYC 9454P Server 256 GB RAM, 2x2 TB NVMe

Order Your Dedicated Server

Configure and order your ideal server configuration

Need Assistance?

⚠️ *Note: All benchmark scores are approximate and may vary based on configuration. Server availability subject to stock.* ⚠️