Full backup of the database, differential backups, and incremental backups __ Database

Source: Internet
Author: User

Data backups are in the form of full backups, differential backups, and incremental backups, so what are the differences between these three types of backups, and how do you choose them in specific applications? This paper introduces these problems.

A brief introduction of backup method

1. Full backup

Backing up all selected folders does not depend on the file's archive attribute 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 attribute.

A full backup is a full copy of all data or applications at a point in time. The actual application is to use a tape to complete the entire system backup, including the system and all the data. The biggest benefit of this type of backup is that you can recover lost data with just one tape. This greatly accelerates the recovery time of the system or data. The disadvantage, however, is that there is a lot of duplication of backup data in all backup tapes, and that the backup takes longer because of the amount of data that needs to be backed up each 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, or it is not marked as a backed-up file after the backup. In other words, the archive attribute is not cleared.

A differential backup is a backup that adds or modifies files after a full backup to the time of a differential backup. In the recovery, we only need to restore the first full and last differential backups .

For example, in Monday, the network administrator routinely carries out a full system backup; In Tuesday, assuming that there is only one asset list in the system, the administrator only needs to clear and back up the asset; in Wednesday, there was another product catalog in the system, so the administrator would not only And the assets of the Tuesday to be a single and backed up. If there is one more payroll in the Thursday system, then the Thursday need to back up the content is: Payroll + Product Catalog + Asset list.

Differential backups, while avoiding two other backup strategy flaws, have their own advantages. First, it has the advantage of short time to save disk space for incremental backups, and secondly, it has the feature of less tape and shorter recovery time required for full backup recovery. System administrators need only two tapes, the full backup tapes and the differential backup tapes from 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 full, differential, and incremental backups. During an incremental backup, only the marked selected files and folders are backed up, which clears the tag, both to mark the file after the backup, or, in other words, to clear the archive attribute.

An incremental backup is one that, after a full or last incremental backup, only backs up files that are incremented and modified compared to the previous one . This means that the object for the first incremental backup is the resulting additions and modifications to the file, and the second incremental backup object is the file that was added and modified after the first incremental backup, and so on.

For example, if the system fails in the morning of Thursday and loses large amounts of data, it is now necessary to restore the system to the Wednesday-night state. The administrator needs to first find the Monday full backup tape for system recovery, then find the Tuesday tapes to recover the Tuesday data, and then recover the Wednesday data by locating the tapes in Wednesday. Obviously this is much more troublesome than the first strategy. In addition, this kind of backup reliability is poor. In this kind of backup, the relationship between the tapes is like a chain, one ring, and any tape that goes wrong can cause the whole chain to be disconnected.

The most notable advantage of this backup approach is that there is no duplicate backup data, so the amount of data backed up is small and the time required for backup is short. However, data recovery for incremental backups is cumbersome. You must have the last full backup and all incremental backup tapes (which can cause recovery failure once you lose or damage one of the tapes), and they must be backed up one at a time in the order from full to incremental, so this greatly prolongs recovery time.

Difference between a differential backup and an incremental backup

As you can see from the above conceptual analysis, the difference between a differential backup and an incremental backup is that they are backed up in a different reference point: The previous full backup, differential backup, or incremental backup, the reference point of which was the last full backup.

The following illustration shows the difference between a differential backup and an incremental backup, where cumulative is a differential backup, differetial incremental backup:

Iii. Examples of combinations of different backup types

1, full backup and differential backup combination

With the weekly data backup plan As an example, we can make a full backup in Monday, with a differential backup from Tuesday to Friday. If the data is compromised in Friday, you only need to restore the Monday full backup and the Thursday differential backup. This strategy requires more time to back up data, but less time to restore the data.

2. Full backup combined with incremental backup

Take weekly data backups as an example, a full backup in Monday, and an incremental backup from Tuesday to Friday. If the data is compromised in Friday, you will need to restore a normal backup of Monday and all incremental backups from Tuesday to Friday. This strategy requires less time to back up data, but it takes more time to restore the data.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.