The internal backup process

When you start a backup, the database may be in use by many people. If you need to restore your database from a backup, you need to know what information has been backed up, and what has not.

When making a backup, the database server:

  1. Issues a checkpoint. Further checkpoints are disallowed until the backup is complete.

  2. Makes a backup of the database files, if performing a full backup.

  3. Makes a backup of the transaction log.

    The backup includes all operations recorded in the transaction log before the final page of the log is read. This may include instructions issued after the backup started.

    The backup copy of the transaction log is generally smaller than the online transaction log. The database server allocates space to the online transaction logs in multiples of 64 KB, so the transaction log file size generally includes empty pages. However, only the non-empty pages are backed up.

  4. Marks the backup image of the database to indicate that recovery is needed. This step causes any operations that happened since the start of the backup to be applied when the backup copy of the database is started. It also causes operations that were incomplete at the checkpoint to be undone if they were not committed.


Understanding backups
How the database server decides when to checkpoint
Managing the transaction log
Understanding parallel database backups