The way data is backed up with full backups, differential backups, and incremental backups, what is the difference between these three ways of backing up, and how do you choose them in a specific application? This article gives an introduction to these questions.
I. Brief introduction of Backup mode
1. Full backup
Backs up all selected folders, and does not rely on the archive properties of the files to determine which files to back up. During the backup process, any existing tags are purged and each file is marked as backed up. In other words, clear the archive property.
A full backup is a complete copy of all data or applications at a given point in time. In practice, a full backup of the entire system, including the system and all data, is done with a single tape. The biggest benefit of this backup approach is that you can recover lost data with just one tape. Therefore, the recovery time of the system or data is greatly accelerated. However, its disadvantage is that the backup data in each full backup tape has a large amount of duplicate information, and because the amount of data that needs to be backed up each time is quite large, the backup takes a long time.
2. Differential backups (differential backup)
Backs up data that has changed since the last full backup. During a differential backup, only those selected files and folders that are marked are backed up. It does not clear the tag, which is not marked as a backed up file after backup. In other words, the Archive property is not cleared.
A differential backup is a backup of files that are added or modified during a full backup to a differential backup during the time period. When recovering, we only need to recover the first full backup and the last differential backup .
For example in Monday, The network administrator routinely makes a full system backup; In Tuesday, assuming that there was only one asset list in the system, the administrator only needed to clear the asset and back it up, and in Wednesday, there was a catalog of products in the system, so the administrator would not only And the assets of the Tuesday were cleared and backed up. If there is more than one payroll in the Thursday system, the content that needs to be backed up in Thursday is: Payroll + Product Catalog + Asset list.
Differential backups, while avoiding the other two backup strategy flaws, have their own advantages. First, it has the advantage of short time for incremental backup, disk space saving, and secondly, it has the characteristics of less tape and short recovery time for full backup recovery. System administrators need only two tapes, full backup tapes and a differential backup tape the day before the disaster, to restore the system.
3. Incremental Backups (Incremental Backup)
Backs up data that has changed since the last backup, which contains a full, differential, incremental, backup. During an incremental backup, only the marked selected files and folders are backed up, and it clears the tag, either: Mark the file after backup, in other words, clear the archive attribute.
Incremental backup means that after a full backup or a previous incremental backup, each subsequent backup is only required to back up the files that were added and modified by the previous one . This means that the object of the first incremental backup is the addition and modification of the file that is produced after the full preparation, and the second incremental backup object is the addition and modification of the file resulting from the first incremental backup, and so on.
For example , if the system fails in the morning of Thursday, a large number of data is lost, Now it's time to restore the system to the Wednesday night state. At this point the administrator needs to identify the Monday full backup tape for system recovery, then find Tuesday tapes to recover Tuesday data, and then find the Wednesday tapes to recover the Wednesday data. Obviously this is much more troublesome than the first strategy. In addition, the reliability of this backup is poor. In this kind of backup, the relationship between the tapes is like a chain, one ring, and any one of the tape problems will cause the whole chain out of line.
The most significant advantage of this backup approach is that there is no duplicate backup data, so the amount of data backed up is small and the backup takes a short time. But the data recovery of incremental backup is more troublesome. You must have a previous full backup and all incremental backup tapes (which can cause recovery failures if one of the tapes is lost or damaged), and they must be reversed back-to-back in chronological order from full backup to incremental backup, so this greatly prolongs recovery time.
Difference between differential backup and incremental backup
As you can see from the above conceptual analysis, differential backups differ from incremental backups in that they are backed up by different reference points: The reference point of the former is the previous full backup, differential backup, or incremental backup, the reference point of which is the last full backup.
Shows the difference between a differential backup and an incremental backup, where cumulative is a differential backup, differetial incremental backup:
Iii. Examples of different backup type combinations applied
1. Full backup combined with differential backup
Taking the weekly data backup plan As an example, we can make a full backup in Monday and make a differential backup from Tuesday to Friday. If the data is destroyed in Friday, then you only need to restore the Monday full backup and the Thursday differential backup. This strategy takes more time to back up the data, but less time is used to restore the data.
2. Full backup combined with incremental backup
Take a weekly data backup as an example, make a full backup in Monday and make an incremental backup from Tuesday to Friday. If the data is corrupted in Friday, then you need to restore the Monday normal backup and all incremental backups from Tuesday to Friday. This strategy requires less time to back up the data, but it takes more time to restore the data.
Full backup, differential backup, and incremental backup of the database