Even with log‑based recovery, checkpointing, and shadow paging, a DBMS can still lose data due to disk failure, accidental deletion, corruption, or media damage. Database backup is the offline (or semi‑offline) technique of making copies of the database so that, if the main data is lost, you can restore from a backup.

In simple terms, database backup is like making a snapshot or copy of your data at a point in time, then storing it safely so you can bring it back if something goes wrong.

What Is a Database Backup?

A database backup is a copy of the database files and sometimes the log files stored on a different storage medium (like a backup disk, tape, or cloud storage).

Backups can be:

  • Cold backups: taken when the database is shut down (offline).

  • Hot backups: taken while the database is running (online), often coordinated with log‑based recovery.

The goal is to have at least one point‑in‑time copy that can be used to reconstruct the database if the primary data is damaged.

Types of Database Backup

1. Full Backup

A full backup is a complete copy of the entire database at a given time.

  • All data pages, indexes, and metadata are copied.

  • On recovery, this is enough to restore the database to the state at the time of the backup.

Pros:

  • Simple to understand and restore.

  • Independent of other backups.

Cons:

  • Large in size; slow and I/O‑heavy to create.

  • Needs lots of storage.

2. Incremental Backup

An incremental backup records only the changes made since the last backup (whether it was full or another incremental).

  • This usually means copying only changed data pages or log segments after the last backup.

  • To restore, you need the latest full backup and then all incremental backups from that point.

Pros:

  • Fast and small backups.

  • Good for frequent backups.

Cons:

  • Restore is slower because you must apply many increments.

  • More complex to manage.

3. Differential Backup

A differential backup records all changes made since the last full backup.

  • Unlike incremental, it does not depend on previous differentials; it always starts from the last full backup.

  • To restore, you need the last full backup and the latest differential backup.

Pros:

  • Faster restore than incremental (only one differential to apply).

  • More storage‑efficient than full‑only.

Cons:

  • Backup size grows over time (until the next full backup).

Why Database Backup Matters

  • Protects against disk failure, corruption, or accidental deletion.

  • Works alongside log‑based recovery:

    • After restoring from a backup, you may replay log records to bring the database up to a more recent state.

  • Essential for disaster recovery and business continuity.

  • Allows you to experiment (for example, schema changes or migrations) with a safe rollback plan.

For beginners, think of backup as taking photographs of your database at different times; if the original is destroyed, you can choose one of those photos and build the database again from it.

Summary

Database backup in DBMS refers to making copies of the database (full, incremental, or differential) so that it can be restored after data loss. Full backups copy everything, incremental backups copy only changes since the last backup, and differential backups copy all changes since the last full backup. Backups are essential for long‑term protection against hardware failure, human error, and media corruption, and they complement online recovery techniques like logging and checkpointing in a complete DBMS recovery strategy.