In this article we will overview differential backup and its specifics. This type of backup cannot be used for file-level or image-based backup. However, there is a popular scenario where you can meet and should use that type. Continue reading for more details.
What Is a Differential Backup?
A differential backup is a type of backup that uploads the new and updated files after the first full backup. It’s essential to remember that each consequent differential backup compares dataset only with the initial full backup.
Facts About Differential Backup
- It’s faster to perform differential backup than to perform a full backup
- A differential backup will become larger than the full backup. Thus, you need to run another full from time to time.
- It’s easier and faster to recover files from a differential backup than from the incremental backup. The reason is the architecture of both solutions.
Differential vs Incremental Backup
Incremental and differential backup types both perform the backup of changed and modified files. However, there is a distinct difference between the two.
- A differential backup grows over time as it consists of all changes since the initial full backup. Thus, it’s slower and takes more storage space than an incremental backup.
- During a recovery, incremental backup software needs to process each increment change and the first full backup to restore data to the required state. This process is slower compared to recovery from a differential backup.
- In an incremental backup, each next increment change relies on the previous one. This means if any of the changes are lost, the whole dataset is lost. To recover from the differential backup, you only need two “files” - the initial full backup and the latest differential.
- Since incremental backups are typically smaller, they can run more often and more data is preserved in the event of a disaster. Incremental backups allow better RPO.
Nowadays, incremental backup has become the most common type used to back up various files and datasets. By default, most backup software developers implement an incremental backup. SQL Server differential backup is a typical use case of differential backup. For other datasets differential backup is not used and cannot be enabled in most backup software solutions.
Differential Backup Use Case: Microsoft SQL Server
To understand how the differential backup works, we will review how it’s used in the backup of Microsoft SQL Server. Microsoft has developed a native backup structure in three layers for its SQL Server databases:
The backup of the whole database: This is the largest of the three backups. You don’t want to run it very often.
SQL Server differential backup contains all changes since the initial full backup. Microsoft SQL Server database is designed in such a way that it’s technically possible to backup only the changed parts of the dataset.
Transaction log backup
The SQL Server database creates a highly detailed map of the database - that’s transaction logs. If the database and differential backups are lost or unrecoverable, the transaction log backup chain is enough to recover the latest recorded state. Backup of the T-logs usually takes less time than a full or differential backup.
All three backup types are complementary to each other in the SQL Server. You will be able to achieve lower downtime and lose less data while restoring from a chain of full-differential-transaction logs.
Further reading Microsoft SQL Server Backup and Restore
A differential backup is a highly specific backup technique and it is not used for the datasets outside of SQL Server databases. When considering other types of backup, like file-level or image-based backups, a differential backup is proven to be ineffective.