Guide

The 3-2-1 backup rule for SQL Server

The 3-2-1 backup rule says: keep three copies of your data, on two different types of storage, with one copy off-site. For SQL Server, that means the live database, a local backup on separate storage and an off-site copy — and, because ransomware now targets backups first, at least one copy that can't be deleted or encrypted, plus restores you have actually tested.

What 3-2-1 means for a SQL Server

RuleMeaningSQL Server example
3 copiesProduction plus two backupsLive database + local backup + off-site backup
2 mediaTwo different kinds of storageLocal disk or NAS + object storage (S3, Azure Blob) or SFTP server
1 off-siteSurvives fire, theft or a site-wide failureCloud bucket in another city, or a server at a second office

The point is independence: no single failure — a dead disk, a burnt-out server room, a mistaken DROP TABLE, a stolen password — should be able to destroy every copy at once.

What doesn't count as a copy

  • RAID and mirrored disks — they protect against a failed drive, not against deletion or corruption.
  • Replicas and availability groups — they replay every change, including the bad ones, within seconds.
  • A .bak on the same volume as the .mdf — one disk failure takes both.
  • A sync folder — if ransomware encrypts the source, the sync client faithfully uploads the encrypted files.

A practical 3-2-1 setup for a small business

  1. Backups on a schedule — for example a nightly full, differential during the week and log backups every 30 minutes for important databases. See SQL Server backup types.
  2. Copy 2, local: a separate disk or a NAS, kept for 7–14 days, for fast restores of everyday mistakes.
  3. Copy 3, off-site: object storage such as Amazon S3 or an S3-compatible service, Azure Blob, Google Drive or an SFTP server at another site, kept for 30 days or more.
  4. Encryption on anything that leaves the building, with the key stored away from the server.

Protecting SQL Server backups from ransomware

Modern ransomware doesn't just encrypt databases; attackers look for backup folders, backup software and cloud credentials first, so they can delete them before demanding payment. Plan as if the SQL Server itself is compromised.

1. Make one copy immutable

Immutable storage can't be changed or deleted until a retention period ends, even with valid credentials. Options include S3 Object Lock in compliance mode (on Amazon S3 and several S3-compatible services), Azure Blob immutability policies, and read-only snapshots on many NAS devices. Set the retention longer than the time an attacker might sit unnoticed — 14 to 30 days is a common starting point.

2. Keep an offline or isolated copy

A copy that isn't connected can't be attacked. For a small office that can be as simple as two USB disks rotated weekly, with one always at home or in another branch. Don't leave the backup share mapped as a drive letter on the SQL Server.

3. Use separate credentials

  • The account that writes backups should not be a domain admin and should not be able to delete them. A write-only S3 key (s3:PutObject only) is a good example.
  • Keep cloud console logins separate from your Windows domain, with multi-factor authentication turned on.
  • Don't store the encryption password or storage keys in plain text on the SQL Server.

4. Watch for trouble

Alerts for failed backups, a server that stops reporting and unexpected changes in the backup folder give you time to react. Silence is the most dangerous state a backup system can be in.

Encryption is not ransomware protection

Encrypting backups stops anyone from reading them. It does not stop an attacker from deleting them. You need immutability or an offline copy for that.

Test your restores

A backup you haven't restored is a hope, not a plan. Test at least monthly, and time the test — that number is your real recovery time. A simple test on a spare server or a test instance:

-- 1. Restore last night's full backup under a new name
RESTORE DATABASE [Sales_RestoreTest]
  FROM DISK = N'D:\RestoreTest\Sales_FULL_2026-09-29_020000.bak'
  WITH MOVE N'Sales'     TO N'D:\RestoreTest\Sales_RestoreTest.mdf',
       MOVE N'Sales_log' TO N'D:\RestoreTest\Sales_RestoreTest_log.ldf',
       RECOVERY, STATS = 10;

-- 2. Check physical and logical consistency
DBCC CHECKDB ([Sales_RestoreTest]) WITH NO_INFOMSGS;

-- 3. Sanity-check that recent data is there (adapt to your schema)
SELECT MAX(InvoiceDate) AS latest_invoice FROM [Sales_RestoreTest].dbo.Invoices;

-- 4. Clean up
DROP DATABASE [Sales_RestoreTest];

RESTORE VERIFYONLY is a useful quick check, but it doesn't prove the database is consistent or that the file is the one you think it is. Full steps and common errors are in how to restore a SQL Server database from .bak.

Monthly restore checklist

  • Restore from the off-site copy, not just the local one.
  • Decrypt and decompress as you would in a real disaster, using the stored password.
  • Run DBCC CHECKDB and check that the latest transactions are present.
  • Record how long it took and who did it.
  • Confirm the application can connect (and fix orphaned users if needed).

How SQLBak Plus fits the 3-2-1 rule

SQLBak Plus sends each backup to several destinations at once — for example a NAS plus an S3 bucket — straight from your server to your own storage. It can keep a local vault copy for a set number of days in a folder with locked-down permissions and tamper alerts, supports S3 Object Lock for immutable off-site copies, encrypts with AES-256 and records a SHA-256 checksum per file. Restoring under a new database name from the web makes monthly restore tests quick.

3-2-1 and ransomware — FAQ

What is the 3-2-1 backup rule?

Keep at least three copies of your data, on two different types of storage, with one copy off-site. For SQL Server that usually means the live database, a local backup on a separate disk or NAS, and an off-site copy in cloud storage or at another location.

Is RAID or a replica a backup?

No. RAID protects against a failed disk and replicas protect against a failed server, but both copy mistakes, deletions and ransomware encryption instantly. A backup is a separate, point-in-time copy you can go back to.

What does 3-2-1-1-0 mean?

An extension of 3-2-1: one of the copies is immutable or offline (so ransomware can't reach it), and restore tests show zero errors.

How often should I test a SQL Server restore?

At least monthly for important databases, and after any change to your backup setup. Restore to a new database name, run DBCC CHECKDB and check that recent data is present.

Build a 3-2-1 backup for SQL Server in minutes

Free for one server and two databases. Storage is your own, so the local copy on a NAS costs nothing extra.

Start free