Bookmarks

3-2-1 backup rule

A scheme for storing backups: three copies of the data on two different types of media, one of them off the primary site.

Also: 3-2-1 rule, three-copy rule, 3-2-1-1-0

checked 9 Nov

All terms

The three numbers are a bare minimum against failure: three copies protect against the loss of any one of them, two types of media protect against the failure of a particular disk model or service, and an off-site copy protects against fire, theft or ransomware that reaches every disk at once.

What the numbers mean

The rule is cited by the US agency CISA in its material on backup options, with a reference to the photographer Peter Krogh’s book “The DAM Book” (2nd edition, 2009).

NumberWhat it meansExample
3at least three copies of the data: the original and two backupsa server disk, a NAS at home, a copy in the cloud
2copies on two different types of media or in two different systemsa local disk and object storage
1one copy off the primary sitea cloud bucket or a server in another region

What it looks like in practice

For example, a 100 GB database: the original on a server disk, a nightly copy on a NAS in the neighbouring rack, and another one in object storage in a different region. “Different media” today usually means different storage platforms: block and object storage count as different even if the physical disks are identical. On virtual machines, copies are placed in another layer — object storage, another region or another account — so that a failure or compromised credentials cannot wipe out every copy at once.

bashThe same database: a local repository and object storage
restic -r /srv/restic-repo backup /var/lib/postgresql        # local copyrestic -r s3:s3.us-east-1.amazonaws.com/db-backups backup /var/lib/postgresql   # off-site copy

The 3-2-1-1-0 variant

Two more numbers are added to the rule: one more copy that is offline, air-gapped or immutable and cannot be reached with ordinary credentials, and zero errors when a restore is verified. The variant addresses the ransomware threat: once they reach the primary disks, ransomware tries to find and encrypt the backups as well, so at least one copy is kept out of ordinary reach — the medium is disconnected, the copy is kept on an isolated server, or immutability is enabled in object storage.

Sources

the term is written from these pages

Verified 9 Nov

Not to be confused with

what it is mixed up with and how it differs

  • replication

    Replication reproduces every change, including accidental deletions and encryption, so it is not a substitute for a backup.

In depth in the references

where the topic is covered in detail

Appears in the references