Cloud VPS from $1.98/mo · pay with Bitcoin, Ethereum, Monero, USDT or Solana · paid in crypto
DevOps

Disaster recovery for VPS workloads: DRaaS or do it yourself

Plan disaster recovery for VPS workloads: set RPO and RTO, match threats to copies, choose DRaaS or a standby you run, and rehearse the failover with a timer.

CloudSat teamNovember 18, 20267 min read
Abstract illustration of two server clusters on distant glowing islands, joined by a thin bridge of light that carries small data blocks across
On this pageSet two numbers before choosing anything

Backups answer one question: can the data come back? Disaster recovery answers two harder ones: how long until people can use the service again, and how much recent work is allowed to vanish. Those two answers, set in advance, decide everything else: whether nightly backups are enough, whether a second server should wait in another region, and whether paying a disaster-recovery-as-a-service (DRaaS) provider makes sense for workloads that run on rented servers.

Set two numbers before choosing anything

  • RPO (recovery point objective): the most data you can afford to lose, measured in time. An RPO of 24 hours means losing yesterday's changes is acceptable. An RPO of one minute means it is not.
  • RTO (recovery time objective): the longest the service may stay down, from the failure to the moment users are back.

Set them per workload, with whoever owns the business side, because every step toward zero costs money:

Workload Example RPO Example RTO
Company brochure site 24 hours A working day
Internal wiki or file share 24 hours Half a day
Online store Minutes An hour or two
Booking or payment system Seconds Minutes

Match each threat to the copy that survives it

A disaster on a VPS is rarely a fire. It is more often one of these, and each one needs a copy kept in a different place:

Threat What gets you back
A bad update or a deleted directory A snapshot or local backup from before the change
A failed host or disk The provider's recovery, or a rebuild from off-server backups
A region-wide outage A copy, and ideally a standby, in another region
Ransomware or a stolen root password Backups the server itself cannot delete or overwrite
Losing the account: unpaid, locked or compromised Copies with another provider or on your own hardware

The last two rows are the ones plans forget. If the backup credentials live on the server, an attacker who owns the server owns the backups. If every copy sits in one provider account, one billing or security problem takes all of them at once.

Four strategies, from cheap to fast

Strategy What runs in the second location Data you can lose Time to recover Cost
Backup and restore Nothing; backups wait in storage Up to the backup interval Hours Storage only
Pilot light A small database replica kept in sync Seconds to minutes Under a couple of hours One small server
Warm standby A scaled-down copy of the whole stack Seconds to minutes Minutes Several servers
Active-active Full capacity, serving users all the time Close to none Close to none Double, plus complexity

Most small teams use backup and restore for most workloads, plus a pilot light for the one database that would hurt to lose. Active-active is a property of the application, not something bolted on later: both copies must accept writes without conflicting.

What DRaaS sells

A DRaaS provider continuously replicates your servers to its own infrastructure, keeps a series of recovery points, and gives you a failover button that boots the copies there, often with orchestration that starts them in order and rewires their network settings. Zerto, Azure Site Recovery and AWS Elastic Disaster Recovery are examples. You pay per protected machine each month, plus storage, plus compute while a failover or a test runs.

The catch for VPS users is access. Replication at the hypervisor level needs control of the host, which no one gets on a rented VPS. What remains is agent-based replication from inside the guest, so check that the agent supports your distribution and kernel, how much bandwidth the first full copy needs, and whether failing back to your original provider is supported or means a manual rebuild.

Do it yourself: four parts

A DIY plan on VPS servers is made of parts many teams already run:

  1. A rebuild recipe. Startup scripts, configuration management or a repository of Compose files that turn a blank server into a working one. Time it: that is the floor of your RTO.
  2. Data copies outside the server. Encrypted, versioned backups in another region and another account, as the backup guide describes. For an RPO of minutes, add database replication to a small standby.
  3. A way to move traffic. DNS records with a short TTL, lowered well before you need them. A floating IP usually helps only inside one region, since it cannot follow a server to another.
  4. A runbook stored somewhere else. If the instructions live on the server that failed, they failed with it.

With PostgreSQL streaming replication, the standby reports its delay and becomes the primary with one call (available from PostgreSQL 12):

-- on the standby: how far behind the primary is it?
SELECT now() - pg_last_xact_replay_timestamp() AS replication_delay;

-- during a failover, on the standby: promote it to primary
SELECT pg_promote();

On a quiet primary that delay grows even when nothing is missing, so read it together with your write traffic. Check the TTL you will be waiting on before the day you need it:

dig +noall +answer shop.example.com A    # the second column is the TTL in seconds

DRaaS or do it yourself

DRaaS Do it yourself
Who runs the failover The service, on your approval You, from the runbook
Best-case data loss Seconds, with continuous replication Seconds with replication, else the backup interval
Works on a rented VPS Only with agent-based replication Yes
Cost model Per protected machine, plus storage and failover compute Standby servers and storage, paid directly
Skills needed Fewer day to day Scripting, replication, DNS
Lock-in High: recovery lives on their platform Low: your scripts and your copies

DRaaS pays off for fleets that are hard to rebuild, such as Windows servers configured by hand over the years. For Linux workloads a script can rebuild in minutes, doing it yourself usually wins on cost and on understanding: you know exactly what a failover does because you wrote it down.

Write the runbook as a numbered list

  1. Who declares a disaster and whom they call, with a named backup person.
  2. Stop writes on the failing primary if it is still reachable, so the two sides cannot both take orders.
  3. Promote the standby, or restore the newest backup onto a fresh server built from the recipe.
  4. Switch DNS, then confirm from outside that the new address answers.
  5. Test the application end to end: sign in, place a test order, send a test email.
  6. Tell users what happened and what, if anything, was lost.
  7. Plan the failback for a quiet hour, with the same care.

Keep a copy offline or in a shared password manager, where the team can reach it when the servers cannot.

Rehearse with a stopwatch

Run the runbook against a copy at least twice a year. Rebuild from the recipe, restore the newest backup, promote a test replica, and write down how long each step took. The measured times, not the targets, are your real RPO and RTO; when they miss, change the plan or renegotiate the targets. On CloudSat, a standby can live in another of the 13 regions on an hourly plan, so a rehearsal environment can exist for an afternoon and be deleted afterward.

FAQ

How is high availability different from disaster recovery?

High availability keeps a service running through common failures, such as one server dying, usually inside one site and automatically. Disaster recovery brings the service back after a failure that takes out the whole site or the data itself. A cluster inside one region is not a recovery plan for that region.

How far apart should the primary and the standby be?

Far enough not to share a failure: another region at least, and another provider for the account-loss case. Distance adds replication delay, so a standby on another continent loses slightly more data in a failover.

Should failover be automatic?

Automatic failover across regions risks both sides accepting writes after a network split, which is worse than downtime. For most small teams, a human decision followed by scripted steps is safer and still fast.

Run it on CloudSat. Cloud VPS on AMD EPYC and NVMe from $1.98/mo in 13 regions, delivered in under 5 minutes and paid in crypto. See plans or deploy a server.