Runbook: Disaster Recovery Plan

Last updated 3 min read
Report issue

Runbook: Disaster Recovery Plan#

When the worst happens: a whole VM lost, a region offline, or the hosted control plane unreachable for a long stretch.

Severity: SEV-1 by definition.

What "disaster" means here#

ScenarioSeverityPlan
Single scope downSEV-3restart, see Common Errors
Single VM down (host issue)SEV-2new VM, restore from agent backup
Whole region down (cloud provider outage)SEV-1failover to another region (HA setup required)
Control plane down (gritiva.com unreachable)SEV-1scopes keep running; new lifecycle ops queue
Mesh totally fragmentedSEV-1manual peer reset, see Mesh stuck runbook

RTO / RPO targets#

  • Single VM loss — RTO 30 min (with a backup), RPO 24h (daily backup cadence)
  • Region loss — depends on your HA setup; we don't multi-region by default today
  • Control plane — we maintain 99.9% uptime; if down, no RTO contract for self-hosted

Procedure: lost a single VM#

This is the most likely scenario. Assumes you have agent-state backups (see Backup & Restore).

Step 1 — Provision a fresh Linux VM#

Whatever your usual provisioning workflow is. SSH in, sudo available.

Step 2 — Install the agent (don't enroll it yet; we restore the old identity in step 3)#

BASH
curl -fsSL https://gritiva.com/install-gritiva.sh | sudo bash
# (don't run `gritiva-agent setup` — the restored state carries the old VM's identity)
sudo systemctl stop gritiva-agent

Step 3 — Restore the previous VM's agent state#

BASH
# Get your last backup
scp old-backup-host:/root/backups/gritiva-2026-05-14.tgz .
sudo tar xzf gritiva-2026-05-14.tgz -C /
sudo systemctl restart gritiva-agent

Step 4 — Verify#

BASH
sudo systemctl status gritiva-agent
sudo /opt/gritiva/gritiva-agent health
sudo /opt/gritiva/gritiva-agent scope-status
# expect: agent active, scopes restored

Within ~60 seconds, the panel should show the VM back online. Scope contents (your application data inside) need to be restored separately — they're in your application backups.

Procedure: control plane unreachable#

If gritiva.com is down, your existing scopes keep running on each VM (they're independent processes). What's NOT available:

  • Creating new scopes
  • Adding domains
  • Mesh peer changes
  • Telemetry/dashboards

There is no offline lifecycle CLI: scope create/start/stop go through the panel or the REST API, so they have to wait for the control plane. What you can still do locally on each VM is inspect and hold state:

BASH
sudo /opt/gritiva/gritiva-agent scope-status     # local view of every scope on this VM
sudo /opt/gritiva/gritiva-agent health           # agent's own health check
sudo systemctl restart gritiva-agent             # last resort if the agent itself is wedged

When the control plane comes back, the agent re-syncs and any drift between local state and desired state gets reconciled.

Procedure: gmesh totally fragmented#

Rare. Indicates a major bug or a network partition.

BASH
# On each VM:
sudo systemctl restart gritiva-agent

On restart the agent re-fetches the entire peer roster from the control plane and re-installs WireGuard configs from scratch. Expect ~2 minutes of full mesh outage during this. Confirm recovery from the panel under Mesh -> your network -> Topology, or:

BASH
curl -s https://api.gritiva.com/api/v1/mesh/peers/all -H "X-API-Key: $GRITIVA_API_KEY"

Run a tabletop exercise quarterly. Suggested scenarios:

  1. "VM prod-eu-1 is gone. Walk me through getting it back."
  2. "gritiva.com is unreachable. We need to start a scope. Show me."
  3. "All gmesh peers between two VMs are stuck. How do you confirm and fix?"

Record actual time-to-recovery vs your RTO target. Adjust your runbooks based on what surprised you.