Skip to content
Log In Sign Up info@muvcloud.com

The Rule in One Line

  • 3 copies: the live data plus two backups.
  • 2 kinds of storage: the copies do not share the same hardware or storage system.
  • 1 off-site: at least one copy is in another place, out of reach of whatever hits the first.

The numbers are a minimum. The idea behind them is independence: no single event should be able to destroy every copy.

Why Three Copies

With one backup, a failure during a restore, or a backup that turns out to be broken, leaves you with nothing. Two independent backups make it very unlikely that both fail at the same time, as long as they really are independent: different storage, different credentials, different schedules if possible.

Two Kinds of Storage on a Server

The rule was written when "media" meant disks and tapes. On servers, read it as two storage systems that do not fail together: the server's own disk, a separate backup server, object storage. Two things do not count as a second kind:

  • Another folder on the same disk: it dies with the disk.
  • RAID: it keeps a server running when a drive fails, but copies a deletion to every drive instantly. See RAID levels explained.

A snapshot at the same provider is a useful layer for undoing a bad change. It is not the off-site copy; see snapshot vs backup.

A 3-2-1 Plan for One Server

CopyWhereTool
1, live dataThe server's diskDatabase dumps as staging
2, first backupA backup server in another locationBorg or restic over SSH
3, off-siteObject storage at another providerrestic or rclone

The tools are covered in BorgBackup, restic, and rclone. The third copy should use a different account and different credentials from the first two.

Immutable and Append-Only Copies

An attacker with root on the server can delete every backup the server can reach. Protect at least one copy against that:

  • Pull, not push: the backup host logs in to the server and fetches the data; the server holds no key to the backups.
  • Append-only: through an append-only Borg key, the server can add archives, but what it deletes is only marked, and stays recoverable until a login with full access next writes to the repository.
  • Object lock or versioning: S3-compatible storage that supports it keeps objects for a set time, even against a delete request.
  • Offline: a copy that is disconnected most of the time.

An extended form of the rule, 3-2-1-1-0, adds one immutable or offline copy and zero errors in restore tests.

RPO and RTO

TermQuestion it answers
RPOHow much recent data can you lose?
RTOHow long can you be down?

A nightly backup means an RPO of up to 24 hours. If that is too much for a shop database, dump it every hour. RTO is set by restore speed: 200 GB over a 100 Mbit/s link takes about 4.4 hours at full rate, before anything is running again. Measure it in a test, not during an outage.

Restore Tests

A backup that has never been restored is not a backup. Once a month:

  1. Restore files from each copy into a scratch directory and compare them with the live data.
  2. Import a database dump into a scratch database and count tables and rows.
  3. Time it, and write down every step that was not obvious.

Common Mistakes

  • One set of credentials for everything: one leaked key deletes all copies.
  • The passphrase only on the server: encrypted backups are useless if the key is lost with the server.
  • Nobody reads the logs: a job that fails quietly for months is discovered on the day you need it.

For the full procedure on one machine, see how to back up a Linux server.

Updated:

Linux VPS with Full Root Access

MUVCloud cloud servers run on KVM with Enterprise NVMe SSD storage and full root access, in Turkey, the Netherlands, and the USA.

Cloud VPS Plans Starting at2.99 $/mo Cheap Linux VPS

No Limits on Service or Support

You are not on your own as your projects grow. Our support engineers are ready 24/7, on several channels, whenever you need them.

Support specialist
  • 100% customer satisfaction goal
  • Our own hardware
  • 24/7 ticket and email support
  • 4 countries with locations