Back to Blog
team@tinypod.app

Disaster Recovery for Self-Hosted Infrastructure

Your server will fail eventually. Disaster recovery planning ensures you can recover quickly when it does.

disaster-recoverybackupsinfrastructure

It Will Happen


Servers fail. Disks die. Data centers have outages. The question isn't if, it's when — and how fast you can recover.


Key Metrics


RTO (Recovery Time Objective)

How long can you be down? An hour? A day? This determines your recovery strategy.


RPO (Recovery Point Objective)

How much data can you lose? Zero? One hour? One day? This determines your backup frequency.


Backup Strategy


The 3-2-1 Rule

  • 3 copies of your data
  • 2 different storage media
  • 1 offsite copy

  • What to Back Up

  • Database dumps (most critical)
  • Application data volumes
  • Configuration files
  • SSL certificates
  • Environment variables / secrets

  • What NOT to Back Up

  • Container images (pull fresh from registry)
  • Application code (it's in git)
  • Operating system (rebuild from scratch)

  • Backup Schedule


    Databases

  • Full dump: daily
  • WAL/binlog archiving: continuous (for point-in-time recovery)
  • Retention: 30 days

  • File Data

  • Incremental backup: daily (with Restic or Borg)
  • Full backup: weekly
  • Retention: 30 days

  • Configuration

  • Stored in git — backed up by default
  • .env files: include in encrypted backup

  • Recovery Procedures


    Document and TEST these procedures:


    Complete Server Loss

    1. Provision new server

    2. Install container runtime

    3. Pull application images

    4. Restore data from backups

    5. Update DNS if IP changed

    6. Verify everything works


    Database Corruption

    1. Stop the application

    2. Restore from latest good backup

    3. Replay WAL/binlog to desired point

    4. Restart application

    5. Verify data integrity


    Testing Your Recovery


    Schedule quarterly disaster recovery drills:

    1. Spin up a new server

    2. Attempt full recovery from backups

    3. Measure actual RTO and RPO

    4. Document what broke and fix it


    If you haven't tested your backups, you don't have backups. You have hopes.


    TinyPod includes automated backups with one-click restore. Your disaster recovery plan starts with deploying on TinyPod.