In short
- A restore is a route. A full backup is the starting point. A differential backup extends exactly its own base full backup. In FULL or BULK_LOGGED, log backups carry the state forward along the available log history.
- Objectives before schedules. How much data loss is acceptable (RPO) and how long it may take to get back up and running (RTO) determine the backup types and intervals.
- A valid file is not yet a restore path. In the lab, a differential backup passed
RESTORE VERIFYONLYand still could not be restored on its own as a new database. With the matching full backup as its base, the restore succeeded. - Ola automates well, but it does not replace verification. In the lab, a LOG run for a SIMPLE database ended with return code 0 without creating a log backup. Check coverage and restore tests separately.
Key pointCheck the whole route to a usable database.
Your backups are running. Can you also restore from them?
A backup job reports success. There are files on the drive. That is a good start. Whether you can resume work after an outage only becomes clear in the next step: Can you reach the backups you need, restore them in the right order and verify the result from a business perspective?
SQL Server comes with the backup and restore features you need for this. Ola Hallengren’s Maintenance Solution helps automate their execution. In this article, we build the basic model, run a first restore and show how individual commands become a workable operational routine.
The short answer: A full backup can be the foundation of a restore. Differential backups extend the full backup they belong to. In FULL or BULK_LOGGED, transaction log backups carry the data state forward along the available log history. Whether this route leads to your target is something you verify with a real restore.
This is especially worthwhile if any of these situations sound familiar:
- “The backup has been running for years. The last time we restored was during the installation.”
- “We have .bak files, but we don’t know exactly which ones belong together.”
- “The job is green, yet backups of a new database are missing.”
- “We want to use Ola and need an approachable way to get started.”
First, clarify: How much can be lost, and how long can it take?
Before you set up a schedule, you need two business objectives.
Recovery Point Objective, or RPO: What is the maximum data loss that is acceptable for the failure scenario under consideration? If no more than 15 minutes may be lost, the process must provide a sufficiently recent restorable state. A log backup every 15 minutes is one possible technical foundation. Failed backups or files that have not yet been transferred can make the result you actually achieve worse.
Recovery Time Objective, or RTO: Within what time should the agreed service be available again? Getting back up and running often involves a replacement system, file transfer, the restore itself, checks and releasing the application. The restore time reported by the SQL command covers only part of that.
Two objectives, two axes
Planning example: at most 15 minutes of missing changes, at most two hours of interruption.
RPOHow much can be lost?
RTOHow long can it take?
- Replacement system
- File transfer
- Restorereported by the SQL command
- Checks
- Release
A small planning example, not a lab measurement: The business side accepts at most 15 minutes of missing changes and two hours of interruption. Then the statement “We back up at night” is not enough. You need a route to a sufficiently recent data state and a proven recovery within this time budget. The objectives must fit the specific failure scenario: a deleted record places different demands on you than the loss of an entire site.
Three backup types, one shared route
Think of the restore as a route. A full backup is one possible starting point. A matching differential backup shortens the way to a later state. Log backups take you further from there. Some sections are interchangeable; others must be available without gaps.
F0FullD1DifferentialL1LogTargetdesired data state
Full: a complete database backup
A normal full backup backs up the database and enough of the transaction log to restore a consistent database state from the backup. SQL Server can keep working in the meantime; a full backup is not a mere file copy of a database that has been shut down.
A full backup on its own gives you a restorable state from that backup. Changes made afterward require further matching backups. In addition, a normal full backup resets the base for later differential backups. It does not break an existing log backup chain. We will need this distinction in Part 2.
Differential: changes since its own base
A differential backup contains the extents, that is, larger units of pages, that have changed since its base full backup. It is not a list of every row changed since yesterday.
If several differential backups follow a full backup from Sunday, you normally need that full backup and that differential for the selected later differential state, not all the differentials in between. A differential from Wednesday is not automatically based on the differential from Tuesday. The actual base information decides.
Which files do you need for the Wednesday state?
Your guess: select the files you need, then “Reveal”.
Answer: For the Wednesday state, you need F0 from Sunday and D3 from Wednesday. D3 contains all extents changed since F0; D1 and D2 are not needed on this route.
As changes accumulate, a differential can become large. It can simplify the restore compared with many log backups; whether it is faster or smaller in your environment must follow from the data (Microsoft: Differential Backups).
Log: carrying the available history forward
In FULL and BULK_LOGGED, transaction log backups can back up the history needed for recovery. For a restore, you need the backups that cover the range from the chosen data state to the target without gaps. Sorting files by modification date alone is not enough for that.
A log backup is not a backup of the entire .ldf file. Nor does it automatically shrink that file. It can create the conditions for reusing log space that is no longer needed; other reasons for retaining the log may still apply. A large log is therefore not automatically solved by a one-time log backup or by regular shrinking.
| Backup type | What it is for | What else the restore needs |
|---|---|---|
| F Full | Starting point with a complete database state | No other database backup for exactly this state; keys and a suitable environment may still be needed |
| D Differential | Later data state based on a specific normal full backup | The full backup it belongs to; subsequent log backups if applicable |
| L Log | Continuation of the available log history | A suitable database starting point and the required log coverage |
The route planner shows how this fits together. Choose a target state and see which files you need for it.
Route planner: Which files does your target state need?
Diagram, not a standard plan: full backup at 00:00, differential at 12:00, log backups every 15 minutes.
16files
F0D1L49L62
Target 15:30: start with F0, take the shortcut through the midday differential D1, then 14 log backups from 12:15 to 15:30. You do not need the 48 log backups before 12:00 on this route.
F0needed for the targetneeded log backuplog backup not needed on this routeTargetselected state
SIMPLE, FULL and BULK_LOGGED are operational decisions
The recovery model helps determine which restore paths are available at all.
SIMPLE
FullDiffLognot available
The SIMPLE model has no regular transaction log backups. The restorable states result from the available full and differential backups. If you need to reach an arbitrary point in time between these backups, you need a different approach.
FULL
FullDiffLog
In the FULL model, regular log backups are part of operations. Merely switching to FULL does not yet create a working backup strategy. After switching from SIMPLE, you must start the log chain with a suitable data backup; the straightforward way is a new full backup. After that, log backups, monitoring and restore tests are part of the job.
BULK_LOGGED
FullDiffLog
BULK_LOGGED is a targeted variant for certain bulk operations, not a general backup booster. If a log backup contains minimally logged changes, point-in-time recovery within that backup may be restricted. The consequence belongs in the plan before such an operational change.
Choose the recovery model based on your recovery objectives. Switching to SIMPLE just to get rid of a growing log can destroy a restore path you need. In the route planner, you can see the difference with the “Recovery SIMPLE” switch (Microsoft: Recovery Models).
The first native backup and restore test
We use a dedicated practice database BackupDemo and a new target name BackupDemo_RestoreTest. The path is a Windows example on the SQL Server machine. On Linux or with other directories, adjust it accordingly. The SQL Server service needs access to the target; a drive that is visible on your workstation is not automatically reachable for the service.
The practice database must be created beforehand and contain test data. Use a new file name for each of your own backup runs.
-- Practice database BackupDemo; Windows example path on the SQL Server machine
BACKUP DATABASE [BackupDemo]
TO DISK = N'D:\SQLBackup\BackupDemo_full_01.bak'
WITH CHECKSUM, COMPRESSION, STATS = 10;
CHECKSUM enables backup checksums and the intended checks of existing page checksums. COMPRESSION can reduce file size and I/O, but it uses CPU and must be supported by your version and edition. STATS shows progress. None of these options replaces the restore test.
First, get to know the file
-- Reads only the backup file; does not change any database
RESTORE HEADERONLY
FROM DISK = N'D:\SQLBackup\BackupDemo_full_01.bak';
RESTORE FILELISTONLY
FROM DISK = N'D:\SQLBackup\BackupDemo_full_01.bak';
RESTORE VERIFYONLY
FROM DISK = N'D:\SQLBackup\BackupDemo_full_01.bak'
WITH CHECKSUM;
HEADERONLY shows backup information, FILELISTONLY the database files. VERIFYONLY checks, among other things, that the backup is readable and complete and, where backup checksums exist, the corresponding integrity. It does not perform a full restore followed by a structural or application check (Microsoft: RESTORE VERIFYONLY).
Then actually restore
The logical names for MOVE must come from FILELISTONLY. In this example, they are BackupDemo and BackupDemo_log; other databases can have several additional files. Every file you need requires a suitable target path. The directories must exist, and the new database name must be available.
MOVE maps each file to a new target
from FILELISTONLYcolumns LogicalName · Type
new target pathfor BackupDemo_RestoreTest
BackupDemoType D · data
D:\SQLData\BackupDemo_RestoreTest.mdf
BackupDemo_logType L · log
D:\SQLLog\BackupDemo_RestoreTest.ldf
additional fileif present
its own target path
FILELISTONLY returns them, on the right the new physical files of the restore test. Source and target names are deliberately different.-- CAUTION: run only on a test target and under a NEW database name,
-- never over the live database. No WITH REPLACE.
-- Take the logical names from RESTORE FILELISTONLY.
RESTORE DATABASE [BackupDemo_RestoreTest]
FROM DISK = N'D:\SQLBackup\BackupDemo_full_01.bak'
WITH MOVE N'BackupDemo'
TO N'D:\SQLData\BackupDemo_RestoreTest.mdf',
MOVE N'BackupDemo_log'
TO N'D:\SQLLog\BackupDemo_RestoreTest.ldf',
RECOVERY, CHECKSUM, STATS = 10;
DBCC CHECKDB ([BackupDemo_RestoreTest]) WITH NO_INFOMSGS;
Here, RECOVERY ends the restore sequence and makes the database usable. For further differentials or log backups, the sequence must stay open beforehand with NORECOVERY. A premature RECOVERY can therefore force you to start over. Try it out:
NORECOVERY or RECOVERY? Restore the sequence yourself
Four backups are to be restored one after another into the new database: F0, D1, L1, L2. For each file, choose how the restore should end.
- F0Full
- D1Diff
- L1Log
- L2Log
BackupDemo_RestoreTestONLINE
Database usable, sequence complete. All four backups have been restored.
Next file: F0
RESTORE DATABASE … FROM F0 WITH NORECOVERYRESTORINGmore backups can be appliedRESTORE DATABASE … FROM D1 WITH NORECOVERYRESTORINGmore backups can be appliedRESTORE LOG … FROM L1 WITH NORECOVERYRESTORINGmore backups can be appliedRESTORE LOG … FROM L2 WITH RECOVERYONLINEdatabase usable, sequence complete
NORECOVERY keeps the restore sequence open (state RESTORING); RECOVERY completes it and opens the database. If you complete it too early, you can no longer apply the remaining backups and have to start from the beginning.Then check the expected test records and one business transaction. A technically consistent database can still contain the wrong point in time. For a complete application test, you may also need logins, jobs, certificates or other databases.
What does each check prove?
File present, file checked, database restored, result verified: in day-to-day work, these four kinds of evidence easily blur together. But each level answers a different question. VERIFYONLY, the restore, CHECKDB and business-level tests each provide different evidence.
Four levels of evidence, and a differential that passes the file check
- 1FileDoes the backup exist, and can you reach it?
- 2
VERIFYONLYIs the backup readable and complete, and do existing checksums match? - 3RestoreDoes this route produce a usable database?
- 4
CHECKDB+ business checkIs it consistent, and does it contain the right state?
Expectation The differential backup D1 passes RESTORE VERIFYONLY. Can it be restored on its own as a new database?
Experiment Two restore routes in our own lab, each on SQL Server 2022 and 2025.
Experiment 1D1alone
- 1File presentyes
- 2
VERIFYONLYsuccessful - 3Restore as a new databaserejected
- 4
CHECKDBand markersnot reached
Message from VERIFYONLY, verbatimThe backup set on file 1 is valid.
Experiment 2F0+D1
- 1Files presentyes
- 3Restore F0, then D1successful
- 4Data markers2 of 2 as expected
- 4full
CHECKDBno errors
Observation SQL Server 2022 CU27 and 2025 CU9 behave the same. The file check of D1 succeeds; nevertheless, D1 alone cannot be restored as a new database. With the matching base full backup F0, the expected state is restored.
Conclusion The file check and the complete restore path answer different questions.
VERIFYONLY.Result of the basic experiment: A differential can be checked successfully with VERIFYONLY even though it cannot yet be restored on its own as a new database. In our own lab on SQL Server 2022 and 2025, the restore succeeds with the matching base full backup. The file check and the complete restore path answer different questions.
Combining full, differential and log backups sensibly
One possible scheme: regular full backups, differential backups in between, and frequent log backups in addition under FULL. This is an example pattern, not a prescribed standard for every database.
A schematic daily routine: full backup at 00:00, differential at 12:00, log backups every 15 minutes. For a target state in the afternoon, you choose the suitable starting point and the log backups needed after it. For a point in time before the midday differential, you cannot use that later differential. This is exactly the scheme behind the route planner (Figure 3) ↑: move the target once before and once after 12:00.
The right frequency depends on the volume of changes, database size, backup window, reachable target, desired data loss and tested restore time. A chain of many small log backups can allow little data loss and still cause a long recovery. The schedule must take both objectives into account.
Ola Hallengren: good automation for native backups
Ola Hallengren’s SQL Server Maintenance Solution provides, among other things, the procedure DatabaseBackup. It selects databases, generates native backup commands, organizes directories and file names and can then run RESTORE VERIFYONLY. With CommandLog, executed commands and their results become traceable.
This is valuable community work. Especially with several databases, a maintained shared procedure helps instead of running many hand-built individual jobs. But Ola does not define your RPO and RTO objectives, nor a complete restore plan. The Maintenance Solution does not include a general procedure that automatically restores your database to the desired point in time from arbitrary files (official Maintenance Solution, DatabaseBackup).
Ola works on top of the native features
1Scheduling
2Ola Maintenance Solution
3SQL Server, native
BACKUP DATABASEBACKUP LOGRESTORE VERIFYONLYSeparate process
RESTORE DATABASE … WITH MOVEDBCC CHECKDBand a business-level checkCommandLog. The restore test remains a separate process with native RESTORE commands.A manageable way to get started
- Download the solution from the official source. Record the version and checksum, and review changes before an update.
- Choose a dedicated administration database and read the installation options. The complete script can create more objects and jobs than you need for a first attempt.
- Make sure the SQL Server service can access the backup target. Job owner and file access identity are separate questions.
- Start with a single test database and a dedicated directory.
- First, have the commands displayed with
@Execute = 'N'. Check the selection, paths and options; this preview call does not yet prove successful file access or a restore. - Run the test for real, check the resulting backups and restore them with native commands.
An example after installing into the administration database DBA:
-- Preview: @Execute = 'N' only displays the commands.
-- Set @Execute = 'Y' only after reviewing the output.
DECLARE @ReturnCode int;
EXEC @ReturnCode = [DBA].dbo.DatabaseBackup
@Databases = N'BackupDemo',
@Directory = N'D:\SQLBackup',
@BackupType = 'FULL',
@Compress = 'Y',
@Checksum = 'Y',
@Verify = 'Y',
@CleanupTime = NULL,
@LogToTable = 'Y',
@Execute = 'N';
IF @ReturnCode <> 0
THROW 50001, N'DatabaseBackup reported an error.', 1;
After reviewing the output, set @Execute = 'Y' for the actual backup. For the corresponding differential and log runs, set @BackupType to DIFF or LOG, respectively. Do not simply count a LOG job as a success for every database: in SIMPLE, this backup type is not available.
@CleanupTime = NULL deliberately skips automatic deletion here. Configure cleanup only once your retention and restore path is settled. This is a starter setting, not a recommendation for unlimited retention.
Tested in the lab: Ola creates full, differential and log backups with checksums and subsequent verification. These files can be restored with native RESTORE commands. Also tested: the LOG call for a SIMPLE database can end with return code 0 without creating a log backup. That is why, in addition to the return code, we also check the expected backup sets for each database (original code at the tested commit).
Green job, missing coverage
DiagramNew database, old job
Inventorydatabases on the server
- A
- B
- Cnew
Backup jobbacks up A and B
successful
Run
Backup sets createdper database
- Apresent
- Bpresent
- Cno backup
Reconciliation: 3 databases in the inventory, 2 backed up. C is new and not yet covered, even though the job is green.
LabTwo LOG runs with Ola, SQL Server 2022 and 2025
| Database | Recovery | Run | Return code | Result |
|---|---|---|---|---|
BrLab | FULL | LOG | 0 | log backup created and verified |
SimpleLab | SIMPLE | LOG | 0 | new LOG backup sets: 0 |
For comparison, the native command BACKUP LOG for the same SIMPLE database: it is rejected with error 4208.
Message, verbatimThe statement BACKUP LOG is not allowed while the recovery model is SIMPLE. Use BACKUP DATABASE or change the recovery model using ALTER DATABASE.
Deep dive for operations
Who starts the runs?
Not needed for the first restore test; important as soon as the backups are supposed to run regularly. Skip to the best practices ↓
With SQL Server Agent
In editions with SQL Server Agent, you can set up separate jobs for full, differential and log backups with suitable schedules. An installed job does not automatically have the right active schedule. Notifications and error propagation are part of the setup.
Without Agent, for example with Express
SQL Server Express does not include SQL Server Agent. Here you need an external scheduler, for example a carefully configured Task Scheduler call. When calling via sqlcmd, the error must be passed on to the scheduler; this requires suitable error options such as -b and checking the process exit code.
The procedure’s return code and the external process status must agree. Version and edition limits of the backup options you use still apply.
Best practices for getting started
- Objectives before schedules. Name the acceptable data loss and recovery time from a business perspective, then choose backup types and intervals.
- Capture newly created databases. An old job that runs successfully can miss new databases. Compare the inventory with the actual coverage.
- Use unique files. Understand overwriting, appending to media and backup positions. To get started, use new file names instead of unclear collective files.
- Combine checksums with real restore tests. Verification, restore,
CHECKDBand business-level tests provide different evidence. - Get backups out of the failure domain. Another file on the same server does not protect against losing that server completely. Plan for separate copies and access rights.
- Think about keys. Encrypted backups require the matching keys and certificates. These must remain available even after the original server is lost.
- Make responsibility visible. Who receives an alert, who assesses it, and who checks the successful rerun?
- Test again after changes. After a version change, new paths, a changed service account or new backup software, check the restore path again.
Where is your copy?
Failure domain 1 · server
Failure domain 2 · separate
Server fails: The source and the local backup are gone together. The separate copy remains reachable.
Your to-do list for a first reliable baseline
Check off what is done. Your progress is saved only in this browser.
Your first restore test card
To fill in on screen or on paper. Entries are neither sent nor saved.
Restore test card
Document the state you reached and the complete route to it. · psg-stack.com
Frequently asked questions
Is one .bak file enough?
For a restore to the full backup state it contains, a single file can be enough. With stripes, however, one backup consists of several files. In addition, keys and a suitable target environment may be needed. The file extension proves neither the backup type nor completeness.
Do I need all differential backups since Sunday?
For the selected differential state, you normally need the full backup it belongs to and that differential (see Figure 2). The base must match; the chronologically closest full backup is not automatically the right one.
Does VERIFYONLY replace a restore test?
It is a useful file check. You verify the complete route to a usable database that is correct from a business perspective by restoring it and running further checks (see Figure 6).
Does a full backup make the log small?
It does not replace a log backup strategy in FULL and does not automatically shrink the .ldf file.
Is Ola a different backup engine?
In the native use described here, DatabaseBackup generates SQL Server backup commands. Ola automates and logs their execution. Features for specific third-party products need to be assessed separately.
Can I restore to an older SQL Server?
A backup from a newer SQL Server version generally cannot be restored on an older engine. A lower database compatibility level does not change that. Before migrations, check the direction and version support (Microsoft: Backup and Restore; versions and builds in our version reference).
Do I also need backups of the system databases?
Yes, using a suitable procedure for master, msdb and model; tempdb is recreated at startup. Restoring a user database does not fully replace logins, Agent jobs and other instance configuration. The special procedures for system databases belong in the operations plan.
We have an availability group. Do we still need backups?
Yes. High availability protects against other failure scenarios. An accidental change can be propagated to other replicas. An independent restore path remains necessary.
Check your understanding
Question
You have a full backup from Sunday and a differential from Wednesday. The differential verifies successfully. The Sunday full backup is no longer available. Can you reliably build a new database from this?
Answer
Not from the differential alone. First, you must find the matching base or another restore path that is fully usable. The successful verification has not replaced the missing base; that is exactly what the lab experiment in Figure 6 shows as well.
How solid are your basics?
Each answer is explained right away, with a link to the relevant part of the article. No cookies.
Origins and thanks
The SQL Server Maintenance Solution is the work of Ola Hallengren and is available under the MIT license (ola.hallengren.com). Especially with several databases, it replaces many hand-built individual jobs with one maintained, shared procedure. Thank you to Ola Hallengren for this work, and to the community that uses, tests and carries the solution forward.
This article is our own account, in our own words, with our own examples and lab tests. Ola Hallengren has neither reviewed nor approved it; the conclusions and any errors are ours. We tested the state at commit 41617578. Newer versions may change parameters and behavior; the DatabaseBackup documentation is authoritative.
Method and limits
Facts as of Oct 22, 2026. Native functional tests and Ola calls on SQL Server 2022 and 2025 in an isolated Linux lab, using synthetic data only. No production acceptance, no general performance figures and no complete platform test. The Windows paths in the text are explained examples; in the lab, the same commands ran with Linux paths.
Setup and test scope in detail
Engines: SQL Server 2022 CU27 (16.0.4295.3) and SQL Server 2025 CU9 (17.0.5005.3), each in its own Linux container, one after the other with the same resource limits. Test databases with a few synthetic data markers; the number of markers after a restore shows which state was reached.
Test scope: 26 data-based checks per engine, all passed. They include the file check of a differential without its base, restore paths with and without the matching base full backup, a full DBCC CHECKDB after every counted restore, the rejection of BACKUP LOG in SIMPLE, and Ola calls for full, differential and log backups followed by a native restore. Both versions behaved the same in the selected cases.
Ola: commit 41617578 from the official repository, individual installation of CommandLog, CommandExecute and DatabaseBackup in a dedicated administration database. No complete installer run, no scheduled jobs.
Not tested in the lab, explained based on the documentation: scheduling with Agent or Task Scheduler, system databases, encryption, BULK_LOGGED, availability groups, Windows paths and a complete application recovery. The run times of the small tests are not performance or RTO measurements and are not used here.
Sources: Microsoft: Backup and Restore · Recovery Models · Differential Backups · RESTORE VERIFYONLY · Ola Hallengren: DatabaseBackup.
Further reading
Continue with Part 2: restore paths, points in time and operations. There we examine COPY_ONLY, missing log backups, tail-log backups, retention and the limits of automated processes.