Almost every team believes it has backups. Far fewer have ever restored one under realistic conditions, timed how long it took and checked that the restored system actually worked. The gap between those two states is where data loss happens: a backup job that silently stopped months ago, a copy stored on the same system that failed, a restore that takes three days when the business can survive one.

This guide covers the ideas that turn backups from a box ticked into a recovery you can rely on. None of it depends on a particular cloud provider or tool; the principles apply to a small project’s database as much as to a large company’s infrastructure.

What you are actually protecting against

Backups exist for several different kinds of disaster, and a strategy that covers one may not cover another. Hardware or service failure destroys data where it lives. Human error deletes or corrupts data through a mistaken command, a bad migration or a buggy deploy. Malicious action, such as ransomware or a compromised account, deliberately destroys or encrypts data, often including any backups the attacker can reach. And regional disasters — fires, floods, prolonged outages — can take out an entire location.

Listing these explicitly is the first step, because it reveals gaps. A replica in the same data centre protects against a failed disk, not against a deleted table, which is faithfully replicated within seconds, and not against an attacker with administrator access to both.

The 3-2-1 rule

A long-standing rule of thumb summarises a resilient approach: keep at least three copies of your data, on at least two different types of storage or systems, with at least one copy off-site. The three copies mean a single failure never leaves you with nothing. The two different systems mean a single fault or bug in one kind of storage does not destroy every copy. The off-site copy means a disaster at one location does not take everything with it.

A common modern extension adds that at least one copy should be offline or immutable — impossible to modify or delete for a set period, even by an administrator — and that backups should be verified with no errors. Immutability matters because attackers increasingly look for and destroy backups before triggering ransomware.

RPO: how much data can you afford to lose?

The recovery point objective is the maximum amount of data, measured in time, that you can afford to lose. If you back up once a night and disaster strikes just before the next backup, you lose almost a day of changes. Whether that is acceptable depends entirely on the system: a blog may shrug it off, an online shop may lose a day of orders, a payments system cannot accept it at all.

Agreeing the RPO with the people who own the business consequences, rather than choosing it from the technical side, is one of the most valuable conversations in operations. It decides how often you need backups and whether you need continuous approaches such as database transaction-log archiving, which allows recovery to a specific moment.

RTO: how long can you be down?

The recovery time objective is how long the system can be unavailable before the damage becomes unacceptable. Restoring a large database from a remote copy, rebuilding servers and reconnecting services can take far longer than people assume, especially if it has never been practised.

Measure it rather than guess. If a full restore takes ten hours and the agreed RTO is two, the strategy needs to change — perhaps keeping a warm standby, restoring the most important data first, or splitting systems so that critical parts recover quickly while less important parts follow.

Snapshots and replicas are not backups on their own

Storage snapshots and database replicas are valuable tools, and they often form part of a backup strategy. But a snapshot that lives on the same storage system shares that system’s fate, and a replica copies every change from the primary, including accidental deletions and corruption, almost immediately.

Treat them as fast recovery options for some failures, and keep independent backups — separate copies, on separate systems, with their own retention and access controls — for the failures they cannot help with.

Backing up databases properly

Copying the files of a running database can produce a backup that cannot be restored, because the files change while the copy is in progress. Use the database’s own backup mechanisms: logical dumps that export data as statements or structured files, physical backups taken with tools designed for the engine, or managed backup features provided by a hosting platform.

For a low RPO, combine periodic full backups with continuous archiving of the database’s transaction log, which allows point-in-time recovery: restoring to the moment just before a bad migration or an accidental deletion. Know which approach you use, how long backups are retained, and how far back you can actually go.

Do not forget what is not in the database

Data lives in more places than the main database: uploaded files and object storage, configuration, secrets, search indexes, message queues, infrastructure definitions and the source code itself. Some of these can be rebuilt from other sources; others cannot.

Make an inventory of every place that holds data you could not recreate, and decide for each how it is backed up and restored. Secrets and encryption keys deserve special care: an encrypted backup is useless if the key needed to decrypt it was stored only on the system that was lost.

The test nobody runs

The only proof that backups work is a successful restore. Schedule regular restore tests: take a recent backup, restore it to a separate environment, start the application against it, and check that the data is complete and current — row counts, recent records, file attachments, everything a user would notice.

Time the whole process and compare it with your RTO. Write down every step, every credential needed and every surprise, and turn those notes into a runbook. The first restore test almost always reveals something — a missing permission, an undocumented step, a backup that was smaller than expected — and it is far better to discover it on a quiet afternoon than during an outage.

Monitoring and alerting

Backup jobs fail silently more often than people expect: credentials expire, storage fills up, a configuration change skips a database, a scheduler stops running. Monitor not only whether the job ran, but whether it produced a backup of plausible size and age, and alert when the most recent good backup is older than it should be.

Review retention too. Keeping every backup forever costs money and may conflict with privacy obligations; keeping too few leaves you unable to recover from a problem that went unnoticed for weeks. A tiered approach — frequent recent backups, fewer older ones — is common.

Access control for backups

Backups contain all your data, so they deserve at least the same protection as production. Restrict who and what can read them, encrypt them, and separate the credentials that can delete backups from those used by everyday systems. An attacker who compromises an application server should not be able to reach, alter or delete the backups.

Immutable storage or write-once retention settings, offered by many storage services, provide a strong safeguard: even an administrator cannot delete protected backups until the retention period ends. Combined with an off-site copy, this protects against the scenario that most often destroys everything at once.

Where the rules stop applying

Backups protect data, but they do not keep a service running during a failure; that is the job of redundancy, failover and high-availability design. A team that confuses the two may have excellent backups and still be offline for a day. Decide separately how you stay available and how you recover lost data.

And backups cannot fix data that was wrong long before anyone noticed, beyond the reach of your retention. Validation, monitoring and careful migrations reduce how often you need to restore at all.

A small project’s minimum

Not every project needs an elaborate system. For a small application, a sound minimum might be automated daily database backups with point-in-time recovery if the host offers it, a weekly export copied to storage with a different provider, uploaded files synced to a second location, and secrets kept in a password manager or secrets store that is itself backed up.

Add a calendar reminder to perform a restore test every few months, and a short document describing how to do it. That modest setup already covers hardware failure, human error and the loss of a single provider, which is more than many much larger systems can honestly claim.

In short

Keep at least three copies on two kinds of storage with one off-site, and make one immutable or offline. Agree RPO and RTO with the people who own the consequences, use the database’s own backup tools with point-in-time recovery where needed, and inventory every place that holds irreplaceable data, including keys and secrets.

Above all, restore regularly, time it, document it and monitor that backups keep happening. A backup becomes real the first time you restore it on purpose.