SQL Server Backup Types and Recovery Models Explained Simply

Most people set up SQL Server backups once, see a .bak file appear every night, and assume they’re safe. Then something goes wrong at 3 p.m., they restore last night’s backup, and a whole day of invoices is gone. Or the transaction log file grows until the disk is full, and nobody knows why.

Both problems come from the same two settings: the recovery model of the database and the types of backup you take. This guide explains both in plain English: full, differential and transaction log backups, the Simple and Full recovery models, how to restore to a point in time, and a sensible schedule for a small business database.

If you’re new to backups in general, start with Database Backup and Restore Explained Simply, which covers the idea across SQL Server, MySQL and PostgreSQL. This article goes deeper into SQL Server.

Timeline of a weekly full backup, nightly differential backups and transaction log backups, restored to 14:59 with STOPAT, plus the Simple and Full recovery models

Two questions to answer first

Before choosing settings, answer two questions with whoever owns the data:

  • How much data can we afford to lose? This is the recovery point objective (RPO). “One day” and “15 minutes” lead to very different setups.
  • How long can we be down while we restore? This is the recovery time objective (RTO). Restoring one full backup is quick; restoring a full backup plus 90 log backups takes longer.

For an accounting or ERP database, “we can lose at most 15 minutes” is a common answer. You can’t reach that with nightly full backups alone.

The three backup types

Full backup

A full backup copies the whole database (all the data pages in use, plus enough of the transaction log to make the copy consistent).

BACKUP DATABASE SalesDB
TO DISK = 'D:\Backups\SalesDB_Full_20261117.bak'
WITH COMPRESSION, CHECKSUM, STATS = 10;
  • COMPRESSION usually makes the file several times smaller and the backup faster. It isn’t available in the Express edition; remove it there.
  • CHECKSUM verifies each page as it’s read, so you find corruption now instead of during a restore.
  • STATS = 10 prints progress every 10%.

On its own, a full backup lets you restore the database to the moment that backup finished. Nothing after it.

Differential backup

A differential backup copies only the parts of the database that changed since the last full backup:

BACKUP DATABASE SalesDB
TO DISK = 'D:\Backups\SalesDB_Diff_20261118.bak'
WITH DIFFERENTIAL, COMPRESSION, CHECKSUM;

Differentials are cumulative. Wednesday’s differential contains everything changed since Sunday’s full backup, including Monday’s and Tuesday’s changes. So to restore you need only the full backup and the latest differential, not every differential in between.

They get bigger every day until the next full backup resets them.

Transaction log backup

Every change in SQL Server is first written to the transaction log (the .ldf file). A log backup copies the log records written since the previous log backup:

BACKUP LOG SalesDB
TO DISK = 'D:\Backups\SalesDB_Log_20261118_1415.trn'
WITH COMPRESSION, CHECKSUM;

Log backups are small and fast, so you can take them every 15 minutes or even every 5. Together they form an unbroken log chain, and that chain is what lets you restore to any moment, for example 14:59, one minute before someone ran a DELETE without a WHERE.

Log backups only work in the Full (or Bulk-logged) recovery model, which brings us to the second setting.

Recovery models

The recovery model decides what SQL Server does with the transaction log after a transaction is finished.

Recovery modelWhat happens to the logLog backups?Restore to
SimpleSpace is reused automatically after each checkpointNot possibleThe last full or differential backup only
FullKept until a log backup copies itRequiredAny point in time
Bulk-loggedLike Full, but bulk loads are minimally loggedRequiredAny point, except inside a log backup that contains a bulk load

Check your databases:

SELECT name, recovery_model_desc, log_reuse_wait_desc
FROM sys.databases
ORDER BY name;

And change one:

ALTER DATABASE SalesDB SET RECOVERY FULL;
-- then take a full backup straight away: the log chain starts from it
BACKUP DATABASE SalesDB TO DISK = 'D:\Backups\SalesDB_Full_start.bak' WITH CHECKSUM;

Which one should you use?

  • Simple is fine for databases you can rebuild or reload easily: a reporting copy refreshed every night, a test database, a staging database for imports. You’ll lose everything since the last backup if the server dies.
  • Full is right for anything where people type in data you can’t recreate: sales, accounting, inventory, HR. It’s the only way to get a small data-loss window.
  • Bulk-logged is a temporary switch some DBAs use during a large import or index rebuild, then switch back to Full. Most small teams never need it.

Why the log file keeps growing

This is the most common SQL Server backup problem, and it has one usual cause: the database is in Full recovery, but nobody takes log backups.

In Full recovery, SQL Server keeps every log record until a log backup copies it. Full and differential backups do not clear the log. So the .ldf file grows, and grows, until the disk fills up and the database stops accepting changes.

log_reuse_wait_desc in the query above tells you why the log can’t be reused:

ValueMeaning
NOTHINGAll fine
LOG_BACKUPWaiting for a log backup. Start taking them (or switch to Simple if you don’t need point-in-time restore)
ACTIVE_TRANSACTIONA long transaction is still open. Find it (see SQL Transactions and ACID)
REPLICATION, AVAILABILITY_REPLICASomething is still reading the log

Shrinking the log file without fixing the cause doesn’t help: it just grows again. Fix the cause first, then shrink once if you need the disk space back.

How a restore works

Say you take a full backup on Sunday at 01:00, a differential every night at 01:00, and log backups every 15 minutes. On Wednesday at 15:05 you discover that a bad update ran at 15:00.

The restore sequence:

  1. The Sunday full backup
  2. The Wednesday 01:00 differential (the latest one before the problem)
  3. Every log backup after 01:00 Wednesday, in order, up to the one that covers 14:59
  4. Stop just before the bad update

Every step except the last uses WITH NORECOVERY, which tells SQL Server “more backups are coming, don’t open the database yet”:

-- Restore as a new database so the original stays untouched
RESTORE DATABASE SalesDB_Restore
FROM DISK = 'D:\Backups\SalesDB_Full_20261115.bak'
WITH MOVE 'SalesDB'     TO 'D:\Data\SalesDB_Restore.mdf',
     MOVE 'SalesDB_log' TO 'D:\Data\SalesDB_Restore_log.ldf',
     NORECOVERY;

RESTORE DATABASE SalesDB_Restore
FROM DISK = 'D:\Backups\SalesDB_Diff_20261118.bak'
WITH NORECOVERY;

RESTORE LOG SalesDB_Restore FROM DISK = 'D:\Backups\SalesDB_Log_20261118_0115.trn' WITH NORECOVERY;
-- ... every log backup in order ...
RESTORE LOG SalesDB_Restore FROM DISK = 'D:\Backups\SalesDB_Log_20261118_1445.trn' WITH NORECOVERY;

RESTORE LOG SalesDB_Restore
FROM DISK = 'D:\Backups\SalesDB_Log_20261118_1500.trn'
WITH STOPAT = '2026-11-18T14:59:00', RECOVERY;

The 15:00 log backup covers 14:45 to 15:00, so it contains the moment 14:59; STOPAT replays it only up to that time, and RECOVERY opens the database. You can then copy the correct rows back into the live database instead of overwriting everything.

Restoring to a new name (with MOVE for the files) is the safe habit: you can compare before you replace anything. The logical file names (SalesDB, SalesDB_log) come from:

RESTORE FILELISTONLY FROM DISK = 'D:\Backups\SalesDB_Full_20261115.bak';

The tail-log backup

If the database is damaged but the log file is still readable, take one more log backup before you restore. This “tail” contains the changes made since the last scheduled log backup:

BACKUP LOG SalesDB
TO DISK = 'D:\Backups\SalesDB_Tail.trn'
WITH NORECOVERY;   -- leaves SalesDB in the RESTORING state, ready to be restored

Without it, you lose up to one log interval of work. If the data files are damaged, add NO_TRUNCATE. Note that restoring over the original database with REPLACE skips the tail-log check, so make sure you meant it.

COPY_ONLY: a backup that doesn’t disturb the schedule

A developer wants a copy of production to test something, so they run a quick full backup. That backup now becomes the base for the next differential, and if they delete the file afterwards, your differentials are useless.

Use COPY_ONLY for any ad-hoc backup:

BACKUP DATABASE SalesDB
TO DISK = 'D:\Temp\SalesDB_copy.bak'
WITH COPY_ONLY, COMPRESSION;

A copy-only backup doesn’t reset the differential base and doesn’t break the log chain.

A sensible schedule for a small business

BackupWhenKept for
FullWeekly (Sunday night), or nightly if the database is small4 weeks
DifferentialEvery night2 weeks
LogEvery 15 minutes during working hours (or 24/7)2 weeks

Plus three rules that matter more than the exact times:

  1. Copy backups off the server. A backup on the same disk as the database disappears with it. Copy to another machine, a NAS or cloud storage.
  2. Test a restore every month. Restore last night’s backups to a test server and run a few queries. A backup you’ve never restored is a hope, not a backup.
  3. Watch for failures. A backup job that has failed silently for three weeks is common.

Schedule the jobs with SQL Server Agent. The Express edition has no Agent, so there you call a script from Windows Task Scheduler with sqlcmd. You can wrap the backup commands in a stored procedure that builds the file name from the date.

Check what was actually backed up

SQL Server records every backup in the msdb database:

SELECT TOP (20)
    database_name,
    CASE type WHEN 'D' THEN 'Full' WHEN 'I' THEN 'Differential' WHEN 'L' THEN 'Log' END AS backup_type,
    backup_start_date,
    backup_finish_date,
    CAST(compressed_backup_size / 1048576.0 AS DECIMAL(10,1)) AS size_mb,
    is_copy_only
FROM msdb.dbo.backupset
WHERE database_name = 'SalesDB'
ORDER BY backup_finish_date DESC;

If the newest log backup is hours old while the database is in Full recovery, something is wrong.

You can also check that a file is readable without restoring it:

RESTORE VERIFYONLY FROM DISK = 'D:\Backups\SalesDB_Full_20261115.bak' WITH CHECKSUM;

VERIFYONLY is a useful quick check, but it isn’t a substitute for a real test restore.

Common mistakes

  • Full recovery with no log backups. The log grows until the disk is full.
  • Simple recovery on a database that needs point-in-time restore. You find out on the day you need it.
  • Ad-hoc full backups without COPY_ONLY, which break the differential chain.
  • Backups stored only on the database server.
  • Never testing a restore.
  • Shrinking the log every night instead of taking log backups. It wastes time and fragments the file.

Practice exercises

Exercise 1. Your database is in Simple recovery. You take a full backup every night at 23:00. The server’s disk fails at 16:00 on Thursday. What is the latest point you can restore to?

Exercise 2. You take a full backup on Sunday and differentials every night. Which files do you need to restore to Thursday night’s state?

Exercise 3. log_reuse_wait_desc shows LOG_BACKUP and the log file is 80 GB. What two options do you have?

Answers

Answer 1. Wednesday 23:00, the last full backup. In Simple recovery there are no log backups, so everything after that (17 hours of work) is lost.

Answer 2. Sunday’s full backup and Thursday’s differential only (restore the full WITH NORECOVERY, then the differential WITH RECOVERY). Differentials are cumulative, so Monday to Wednesday aren’t needed.

Answer 3. If you need point-in-time restore, start taking regular log backups (BACKUP LOG); after the first one the space inside the log can be reused, and you can shrink the file once to a sensible size. If you don’t need it, switch to Simple recovery (ALTER DATABASE ... SET RECOVERY SIMPLE), and the log space is reused after the next checkpoint.

Summary

  • Full backups copy everything; differentials copy changes since the last full; log backups copy the transaction log and allow point-in-time restore.
  • The recovery model decides whether log backups are possible: Simple (no), Full (yes, and required), Bulk-logged (yes, with limits).
  • A growing log file in Full recovery almost always means missing log backups.
  • Restore with NORECOVERY until the last step; use STOPAT to stop just before a mistake.
  • Use COPY_ONLY for ad-hoc copies, keep backups off the server, and test restores regularly.

Related articles

Scroll to Top