19 Years in Penang, Malaysia +6010-276 0878 [email protected]

Software Challenges & Security

3-2-1 Backup Architecture: An Engineer's Guide to Recoverable Systems

By Ts. Lukas J. Tan · November 9, 2026

Summary

A 3-2-1 backup architecture keeps at least three copies of important data, on at least two different types of storage, with at least one copy held off-site. For engineers, the rule is a design rule more than a shopping list: no single failure, credential or automated process should be able to destroy every recoverable copy at once.

This article looks at the rule from the build side. It shows how to fit 3-2-1 onto real systems, why backup credentials must stay separate from production, and why keeping a long history of backups matters more than backing up often once a compromise is possible. It also shows how to prove that restores work instead of assuming they do. Finally, it looks at a newer concern: AI agents and automated workflows that can change data faster than people can notice.

The Problem in Technical Terms: Copies Are Not Recovery Points

Most teams already have copies of their data. Laptops sync to a cloud drive, databases replicate to a standby, and a nightly job writes an archive somewhere. The trouble is that many of these tools are built to keep data available, not to make it recoverable.

Synchronisation and replication copy whatever state they see. If a user deletes a folder, the deletion syncs. If ransomware encrypts files, the encrypted versions replicate. If a faulty migration corrupts a table, the standby receives the same corruption within seconds. From the system's point of view, everything worked.

A backup job has a similar blind spot. It copies bytes; it does not judge them. A job that ends with exit code 0 tells you the data was read and written. It does not tell you whether that data was correct, untouched by an attacker or restorable.

The threats a backup design must survive fall into separate kinds of failure:

  • Hardware or media failure: a disk, server or storage device stops working.
  • Site loss: fire, flood or theft affects the whole office or data centre.
  • Logical error: an accidental delete, a bad deployment or a faulty script changes data incorrectly.
  • Credential compromise: an attacker takes over an account that can reach both production and backups.
  • Silent compromise: someone alters data or plants malicious software, and the change is backed up for days or weeks before anyone notices.

The 3-2-1 rule deals with the first two directly. The last three are where engineering decisions matter most.

Architecture: Mapping 3-2-1 onto Failure Domains

A useful way to read the rule is in terms of failure domains: groups of things that fail together. Each number in the rule forces a separation:

  • 3 copies keep the working data apart from its recovery points: one production copy plus two independent backups.
  • 2 storage types spread the technology risk. If one storage platform, file system or vendor has a problem, the other is unlikely to have the same one.
  • 1 off-site copy spreads the physical risk. Whatever happens to the primary location should not reach this copy.

A typical small-scale design looks like this:

[Production]  laptops, file share, app database
      |
      | scheduled, encrypted, deduplicated
      v
[Tier 1: local backup]  separate NAS or backup server
      |                 fast restores, short retention
      | written independently
      v
[Tier 2: off-site]  object storage with retention lock
                    longer history, separate credentials

Two design choices in this diagram deserve attention.

Push versus pull

In a push model, each production machine holds credentials that let it write to the backup store. In a pull model, the backup server connects to production and fetches the data. Pull keeps backup credentials off production machines, so an attacker on a compromised machine can reach less. Push is simpler to roll out across many laptops. If you choose push, give production machines the right to add backups only, never the right to delete them.

Independent tiers, not a chain

If Tier 2 is only a mirror of Tier 1, a deletion or corruption on Tier 1 can spread off-site. Where possible, write Tier 2 independently, or use storage that enforces retention on its own side. Then the off-site copy is not just another copy of the same mistake.

Implementation Details

Start with an inventory, not a tool

Before choosing software, list what must be recoverable and how quickly. For each system, record where the data lives and who owns it. Record how much data loss is acceptable, the recovery point objective (RPO), and how long the business can run without the system, the recovery time objective (RTO). A five-person company may have a short list: invoices, customer contacts, business correspondence and financial documents. A manufacturer may need to rank inventory, order processing and production scheduling in the order they should be restored. This list drives every later decision.

A backup job that checks its own storage

Open-source tools such as restic make encrypted, deduplicated snapshots and include integrity checks. A minimal nightly job might look like this:

#!/bin/sh
set -eu
export RESTIC_REPOSITORY="/mnt/backup/repo"
export RESTIC_PASSWORD_FILE="/etc/backup/repo.pass"

restic backup /srv/data --tag nightly
restic check --read-data-subset=5%
restic forget --keep-daily 7 --keep-weekly 4 --keep-monthly 12 --prune

The check step reads back a sample of the stored data to find damage in the backup store. It does not confirm that the source data was healthy when it was backed up. That is a separate problem, covered below.

A long backup history is your defence against silent compromise

The forget rule above keeps daily, weekly and monthly snapshots, and that history matters. If an intrusion goes unnoticed for three weeks, seven daily snapshots are not enough, because every one of them may contain the compromised data. Weekly and monthly snapshots give you an older point to go back to. Decide how long to keep backups by asking how long a problem could stay hidden in your systems, not by how much storage costs this month.

Immutable storage for the off-site tier

Immutable storage stops anyone from changing or deleting files until a set retention period ends. Several object storage services offer it. On Amazon S3, for example, you can enable Object Lock on a bucket that has versioning turned on and set a default retention period:

aws s3api put-object-lock-configuration \
  --bucket example-backup-bucket \
  --object-lock-configuration '{
    "ObjectLockEnabled": "Enabled",
    "Rule": { "DefaultRetention": { "Mode": "COMPLIANCE", "Days": 30 } }
  }'

In compliance mode, no user can shorten or remove the retention period. That is exactly what you want against an attacker with stolen credentials. It also makes setup mistakes expensive, because you cannot undo them early. Test with a short period first.

Separate credentials and minimal permissions

Treat backup access as a separate security zone:

  • Use dedicated accounts for backup jobs, separate from any administrator or application account.
  • Give the backup job only the rights it needs. A job that can create snapshots should not also be able to delete them.
  • Give the right to delete old backups to a different account, ideally used only from one controlled machine.
  • Protect backup consoles with multi-factor authentication. Store the encryption key or password somewhere that does not depend on the systems being backed up.

A person who can edit an everyday business document should not automatically be able to delete every backup of it.

Automated restore testing

A backup that has never been restored is an untested assumption. The United States Cybersecurity and Infrastructure Security Agency has long recommended keeping offline backups and testing recovery regularly to prepare for ransomware. Restore tests can be automated:

function restore_drill(system):
    snapshot = pick_random_snapshot(system, max_age_days=90)
    target   = provision_isolated_environment()
    restore(snapshot, target)

    assert files_open_and_parse(target)
    assert row_counts_within_expected_range(target)
    assert application_starts(target)

    record(system, snapshot.id, duration, result)
    destroy(target)

Two details matter. The restore goes to a separate, isolated environment, never back over production. And the test records how long the restore took, which shows whether your RTO is realistic or only written down.

Monitoring with a named owner

Backup jobs fail quietly: a full disk, an expired token, a changed path. Raise an alert when a backup has not succeeded on time, not only when a job reports an error, because a job that never started reports nothing. Give each alert a named owner. Make sure at least one other person knows how to run a restore if that owner is away.

Scaling the Same Design

The architecture stays recognisable as organisations grow. What changes is how strictly it is run.

A microbusiness running laptops, a shared folder and cloud applications can start with automatic backups to a separate encrypted device plus an encrypted off-site copy. The documentation can fit on one page.

In a company of 30 to 50 people, departments keep their own sales, accounting, inventory and payroll data, so backing up individual computers is no longer enough. The team needs a map of where data lives, a backup schedule for each system and restricted backup access. It also needs clear answers to everyday questions: who watches for failures, who checks storage space, who changes passwords and keys, and who confirms that restores work. Much of the improvement here comes from writing down and reviewing the process the company already has.

In large enterprises such as manufacturers, hospitals and financial institutions, backup becomes part of keeping the business running during an incident. Teams plan which systems to restore first, keep separate recovery environments, tightly limit administrator access, use immutable storage and run scheduled disaster recovery exercises. Accuracy of records, access control and audit requirements carry more weight where wrong data has serious consequences.

At every size the principle is the same: several copies, more than one type of storage, and at least one protected copy outside the main location.

AI Agents, Automation and the Speed of Damage

Teams are now connecting AI agents to file systems, databases and workflow tools. An agent that can read documents, update records and start workflows can save real effort. It can also apply a wrong change to thousands of records before anyone checks.

AI is not unsafe by nature. The point for engineers is that more automation means permissions, monitoring and recovery matter more. Some practical patterns:

  • Give agents their own limited service accounts with no access to backup systems.
  • Log every change an agent makes, with enough detail to identify the affected records.
  • Take a snapshot before a large automated batch job, so a clean copy exists from just before the change.
  • Put rate limits or approval steps on destructive actions such as bulk deletes.

When software acts on our behalf, recovery has to be part of the design from the start, not added after the first incident.

Pitfalls and Trade-offs

  • Treating sync as backup. Cloud drives and replicas keep data available, but they also copy deletions and corruption.
  • Trusting the newest snapshot. After a compromise, the latest backup may contain the attacker's changes. The copy you need is the most recent one you can show is clean, which may be days or weeks older.
  • Assuming encryption protects the content. Encryption stops people from reading the backup without permission. It does not detect a malicious change made to the files before the backup ran.
  • One account for everything. If the same administrator account manages production and backups, one stolen password reaches both.
  • Immutable storage without planning. Locked retention protects against deletion, but it also locks in storage costs and any setup mistakes for the whole period.
  • How often versus how far back. Hourly backups mean less data lost after an accident. A long history protects against a compromise that stays hidden for weeks. Storage budgets force a balance, and the right balance depends on your risks.
  • Untested restores. Slow restores, missing dependencies and lost keys are usually found during an incident, unless restore tests find them first.
  • Set and forget. As a business grows, it adds new systems, new online services and new places where data is stored. A backup design that is never reviewed slowly stops covering what matters.

FAQ

What is the 3-2-1 backup rule?

Keep at least three copies of important data, on at least two different types of storage, with at least one copy off-site.

Is cloud sync the same as a backup?

No. Sync copies deletions and corruption to every connected device. A backup keeps separate copies from different points in time that you can go back to.

Does encrypting backups protect against ransomware?

Only partly. Encryption stops people from reading the backup without permission. It does not stop an attacker from deleting backups, and it does not detect changes made before the backup ran. Immutable storage, separate credentials and a long backup history fill those gaps.

How long should backups be kept?

Long enough to cover how long a compromise could go unnoticed in your systems. Many teams keep daily, weekly and monthly snapshots; there is no single correct number.

How often should restores be tested?

Regularly, and more often for critical systems. Automate restore tests into a separate, isolated environment, and test again after any major system change.

Conclusion

Building new capabilities and protecting existing data are part of the same engineering responsibility. Automation, cloud platforms and AI agents add value only if the systems behind them can recover from a bad day. The 3-2-1 rule is the foundation. Separate credentials, a long backup history, immutable storage and tested restores turn it into a system you can rely on.

A practical starting point is three questions. Do we have three copies of the data that matters? Are they spread across different types of storage, with one off-site? Can we restore a version we know is clean, and have we proven that recently?

If any answer is uncertain, that is the place to begin. You are welcome to read our other Insights on software security, or book a Discovery Session with Maple Software Creation to review how your systems are backed up and how they would be recovered.

See how this plays out for a real client

Twelve detailed, quantified problem-to-outcome case studies across industries in Malaysia.