Console Login

Disaster Recovery 101: Why RAID is Not a Backup and How to Survive the Inevitable

Disaster Recovery 101: Why RAID is Not a Backup

Let’s be honest for a second. If you are sleeping soundly because your server has RAID 10, you are one typo away from unemployment. I've seen seasoned sysadmins accidentally rm -rf a production database directory, and I've watched RAID controllers corrupt mirror drives simultaneously. Hardware redundancy handles hardware failure; it does not handle human stupidity or catastrophic data center outages.

In the Norwegian hosting market, where we pride ourselves on stability and the robustness of the NIX (Norwegian Internet Exchange), we sometimes get complacent. But whether you are hosting a high-traffic Magento store or a critical SaaS application, your uptime is only as good as your worst day. Here is how to plan for it using tools available right now in 2015.

The RTO and RPO Reality Check

Before writing a single script, define your metrics. If you don't know these, you don't have a plan.

  • RPO (Recovery Point Objective): How much data are you willing to lose? One hour? One transaction?
  • RTO (Recovery Time Objective): How long can you be down before your CEO starts screaming?

If your client demands "zero downtime" and "zero data loss" but pays for a single VPS, show them the CAP theorem and hand them a quote for a load-balanced, multi-site cluster. For the rest of us, we aim for the sweet spot: quick recovery with minimal complexity.

The "Battle-Hardened" Backup Stack

Forget complex enterprise software suites that cost more than your infrastructure. The most reliable tools are often already installed on your Linux box.

1. Database Consistency is King

Simply copying /var/lib/mysql while the server is running is a recipe for corruption. For MySQL/MariaDB, mysqldump is fine for small databases, but it locks tables. For serious production workloads, use Percona XtraBackup. It allows for hot backups without locking your database.

# A simple wrapper for innobackupex
innobackupex --user=root --password=YOURPASS /mnt/backups/mysql/
innobackupex --apply-log /mnt/backups/mysql/2015-07-14_00-00-00/

2. The Power of Rsync

Once you have your local dumps, you need to get them off the server. If your backup lives on the same disk as your OS, it dies with the OS. We use rsync because it's bandwidth-efficient—critical if you are pushing gigabytes across the wire.

Pro Tip: Always use the --bwlimit flag if you are backing up during business hours to avoid saturating your uplink and killing your web traffic latency.

rsync -avz -e ssh --bwlimit=2000 /mnt/backups/ remote_user@backup.coolvds.com:/home/backups/

Data Sovereignty and The "Datatilsynet" Factor

Here in Norway, we take privacy seriously. With the strict enforcement of the Personopplysningsloven (Personal Data Act) and the watchful eye of Datatilsynet, where you store your backups matters just as much as where you host your app.

Sending your disaster recovery snapshots to a cheap bucket in the US might violate Safe Harbor agreements (which are currently under heavy scrutiny in the EU courts). Keeping your data within Norwegian borders—or at least within the EEA—is not just good latency practice; it's often a legal requirement. This is why we architect CoolVDS infrastructure strictly within local, compliant data centers.

Infrastructure Architecture: The CoolVDS Approach

Software won't save you if the underlying hypervisor is unstable. In 2015, we are seeing a shift away from OpenVZ containers for critical workloads. Why? Because "noisy neighbors" can steal your CPU cycles, and kernel panics on the host node take down everyone.

This is why serious architects choose KVM (Kernel-based Virtual Machine). KVM provides true hardware virtualization. If another tenant on the node crashes their kernel, your instance keeps humming. At CoolVDS, we enforce strict isolation and use NVMe storage (where available) to ensure that your backup jobs don't choke your disk I/O.

A Simple Disaster Recovery Plan for 2015

Component Strategy Frequency
Code / Configs Git Repository (Private) Real-time
Database Percona XtraBackup -> Offsite VPS Hourly / Daily
User Uploads Rsync to Secondary Storage Daily

The "Fire Drill"

A backup is not a backup until you have successfully restored from it. Set a reminder for once a quarter: spin up a fresh VPS instance on CoolVDS (it takes about 55 seconds), grab your latest backup, and try to bring the application online. Time it. Document the errors.

If you wait until the actual disaster to figure out your `restore` script has a syntax error, you have failed.

Don't gamble with your data. Build a robust recovery pipeline today. If you need a reliable, high-performance target for your backups or a primary host that respects Norwegian data standards, deploy a KVM instance on CoolVDS and sleep a little better tonight.