Cybersecurity

Backups as a Security Control: The 3-2-1 Rule

Build backups that survive ransomware, theft and mistakes using the 3-2-1 rule, offline or immutable copies and regular restore tests.

Key takeaways

  • Three copies, two media types and one off-site location protect against failures that would take out any single copy.
  • Ransomware can encrypt or delete any backup your computer can write to, so keep a copy that's offline or immutable.
  • Sync services mirror changes and deletions, so they aren't a backup by themselves unless version history covers you.
  • A backup you've never restored from is unproven, so test restores on a schedule.
  • Protect backups with encryption and separate credentials, and keep the recovery keys somewhere you can reach in a disaster.

The 3-2-1 rule says to keep three copies of your data, on two different kinds of storage, with one copy somewhere else. Add that at least one copy should be out of reach of an attacker who controls your computer, and test that you can restore from it. That's the whole idea, and it turns many disasters into inconveniences.

Backups are usually filed under housekeeping, but they're a security control. Preventive defenses try to stop harm. Backups decide what you can recover when prevention fails: after ransomware, theft, a dead drive, a vindictive deletion or an honest mistake.

What the numbers mean

Three copies means the original plus two backups. If a single backup is damaged at the moment you need it, you still have another.

Two media means the copies shouldn't share a failure mode. An external drive and a cloud service qualify. Two folders on the same disk don't.

One off-site protects against events that affect a whole location: fire, flood, theft or a power surge. A cloud service or a drive kept at work or with a relative both count.

Many practitioners extend the rule with an extra requirement that one copy be offline or immutable, and with a check that restores complete without errors. You'll see variations such as 3-2-1-1-0, but the principle stays the same.

A household 3-2-1 setup (example)
Copy 1: working files The data on your laptop or phone that you use every day. Copy 2: local backup An external drive or network storage for fast restores. Copy 3: off-site backup A cloud backup service or a rotated drive stored elsewhere. Unreachable copy A disconnected drive or locked, versioned storage that malware can't alter. Copy 1: working files The data on your laptop or phone that you use every day. Copy 2: local backup An external drive or network storage for fast restores. Copy 3: off-site backup A cloud backup service or a rotated drive stored elsewhere. Unreachable copy A disconnected drive or locked, versioned storage that malware can't alter.

Why attackers care about your backups

Ransomware operators know that a victim with good backups doesn't need to pay. So attacks commonly look for backup software, network shares and cloud consoles, and try to delete or encrypt them before announcing themselves. See how ransomware works for the broader sequence.

That means the question to ask about each backup is: if someone had control of my computer and my usual passwords, could they destroy this copy? A drive that's always plugged in fails the test. So does a network share the computer writes to with the same account, and a cloud backup whose console uses your everyday password without a second factor.

Offline, immutable and versioned

Three techniques put distance between an attacker and your data.

  • Offline (air-gapped) copies are physically disconnected. Rotating two external drives, one connected and one in a drawer or elsewhere, is a simple version.
  • Immutable storage refuses changes or deletion for a set period, even with valid credentials. Many cloud storage and backup services offer a lock or retention setting.
  • Versioned backups keep earlier states of files, so you can go back to before the damage, provided the history is long enough and can't be purged by the same account.

Keep versions long enough to cover the time it might take you to notice a problem. Damage to rarely opened files can sit unnoticed for weeks.

Sync is not backup

File sync keeps devices consistent. Delete a file on one and it disappears from others. If malware encrypts a folder, the encrypted versions sync too. Many sync services offer a recycle bin and version history, which helps, but retention is limited and an attacker with account access may be able to empty it. Sync is not backup goes through the cases.

What to back up

Think about what you couldn't recreate.

Data Common blind spot
Photos and videos Stored only on a phone or a single drive
Documents and tax records Scattered across desktop and downloads
Email and calendars Assumed safe in the provider's cloud
Password manager vault No export or emergency access
Authenticator and recovery codes Lost along with the phone
Business data in online apps Provider's resilience mistaken for your backup
Device and router settings Rebuilt from memory under pressure

Online services protect their own infrastructure. That may not cover you if you or an intruder delete records, or if your account is closed. Check what each service lets you export, and read backing up and exporting email for mail.

Choosing tools

Built-in options are a good start: File History or the backup features in Windows, Time Machine on macOS, and the phone platform's backup. On Linux, tools such as rsync for copies, or deduplicating programs such as restic and Borg for versioned, encrypted backups, are widely used.

A simple one-way copy with rsync looks like this:

rsync -av /home/alex/documents/ /mnt/backupdrive/documents/

That's a mirror of current files without history. Use a versioned tool if you want to travel back in time, and be careful with options that delete files at the destination.

For cloud backup services, check version retention, whether files can be locked against deletion, how restores work for large amounts of data, and who holds the encryption keys. How to choose a cloud backup service gives a fuller list.

Decide how much loss you can accept

Two questions shape a plan. How much recent work can you afford to lose? That's your recovery point objective, and it sets how often you back up. How long can you be without your data? That's your recovery time objective, and it sets how fast the restore must be.

A student might accept losing a day and waiting a weekend. A shop taking orders may need hourly copies and a restore within hours. Restoring a large archive over a home connection can take days; the transfer time planner helps estimate it. RPO and RTO explains these terms for larger setups.

Matching effort to the data (example)
Easy to recreate, rarely changes Installers and public downloads. A single copy may do. Easy to recreate, changes often Caches and temporary files. Usually skip them. Irreplaceable, rarely changes Family photos and records. Several copies, one offline. Irreplaceable, changes often Active work and accounts. Frequent, versioned, automatic backups. Easy to recreate, rarely changes Installers and public downloads. A single copy may do. Easy to recreate, changes often Caches and temporary files. Usually skip them. Irreplaceable, rarely changes Family photos and records. Several copies, one offline. Irreplaceable, changes often Active work and accounts. Frequent, versioned, automatic backups.

A worked example for a household

Say a family has two laptops, two phones and a shelf of old photos. A workable plan could look like this.

  1. Each laptop backs up automatically to a network storage box or an external drive, with version history on.
  2. The same laptops run a cloud backup service that keeps earlier versions, protected by a unique password and a second factor.
  3. Phones use the platform's backup, and photos are also copied to the laptops on a regular schedule.
  4. Once a month someone connects a spare drive, copies the photo and document folders, unplugs it and puts it in a drawer at a relative's home or at work.
  5. Password manager recovery details and backup encryption keys are written on a sheet in a safe place.

Walk through failures to check it. A spilled coffee costs a laptop, and the local backup restores it. A house fire takes the laptops and the box, leaving the cloud copy and the offsite drive. Ransomware encrypts a laptop and the mapped storage box; the cloud versions and the unplugged drive remain. An account takeover wipes the cloud backup, and the local copies are still there.

What a small business should add

A business needs the same shape with more discipline. Assign a named person who checks backup reports. List every system that holds important data, including the accounting service, the website, the customer database and the configuration of routers and firewalls. Decide the order in which you'd bring them back, because restoring everything at once is rarely possible.

Back up databases with the database's own dump or snapshot tools, since copying files from a running database can produce a copy that won't open. Set retention to satisfy legal and tax obligations, and delete data you're no longer allowed or required to keep. Write the restore steps down and keep a printed copy, because your documentation may be on the machine that just failed.

Test your restores

Backups fail quietly: a drive fills up, a password expires, a folder was never included. Schedule a test every few months.

  1. Pick a few files at random and restore them to a different location.
  2. Open them and check they're complete.
  3. Once a year, practice a bigger restore, such as a whole user folder to another computer.
  4. Note how long it took and what you needed: keys, software, passwords.
  5. Fix anything that surprised you.

Turn on notifications for failed jobs, and be suspicious of silence. A system that never reports anything may have stopped running.

Protect the backups themselves

A backup contains everything, so treat it as sensitive. Encrypt it. Use a separate account or credential with multi-factor sign-in for cloud backup administration. Store the encryption passphrase and recovery key where you can get them if your main computer and phone are gone, such as a printed sheet in a safe place. Losing the key turns a good backup into noise.

For a small business, separate duties: the account that runs daily backups shouldn't be able to delete old ones, and backup systems shouldn't depend entirely on the same directory login as everything else.

Restoring after an attack

Don't restore onto a compromised system. First cut off the attacker: isolate affected machines, find out how they got in if you can, and rebuild from clean installation media. Then restore data from a version that predates the compromise, scan it, and change credentials. If you restore programs and settings wholesale, you may restore the intruder's foothold too. The broader order of steps is in incident response plans for small organizations.

Common questions

Is a NAS enough?

A network storage box is a good second copy, but it sits in the same building and is often reachable from your computers. Add an off-site and an unreachable copy. Snapshots on the box help if the admin account is well protected.

How often should I rotate offline drives?

As often as matches the amount of work you'd accept losing. Weekly suits many households. Put it on the calendar.

Written for 4Internet with AI writing tools and not reviewed line by line by a person. Check anything you rely on with the maker, provider or standard concerned. Report an error.

Keep reading

All 45 articles in Cybersecurity →

Latest news on this topic