Full backup is preferred during VM backup, but in the case of an existing full backup, incremental backup is used directly.
After the full backup, new business data (G and H in the figure above) is continuously written and marked with bitmaps. It can be directly written into the QCOW2 file at the original locations, and during the next backup, only the modified data is incrementally backed up. When the backup is completed, the bitmap is reset to zero for smooth backup operation each time. New data can be directly written into the file at the original locations. COW will not occur, or it will not result in any disorder in the mapping between the QCOW2 file and the data locations. As a result, the performance of QCOW2 images is not compromised. The incremental backup accelerates the process by reducing the volume of data to be backed up each time.
Incremental backup files are deleted, and the data of all incremental backup files is merged in a way that all the reserved backup data is complete and usable. This frees up space quickly and implements efficient utilization of backup repository resources.
Figure 2: Backup File Deletion and Merge Process
The deletion operation eliminates the restore point of incremental backup file 2, but the data of incremental backup 1, incremental backup 3, and subsequent ones is all complete, accurate, and recoverable.
Quick backup also features multi-disk data consistency check in scenarios where multiple disk images of a VM or disk images of multiple VMs are related. For example, in database application scenarios, the data disks and log disks of the database (such as SQL Server or Oracle) must maintain consistency at the time of backup. Otherwise, the recovered database may still be invalid due to inconsistency. Sangfor, with its quick backup function, ensures data consistency across multiple database disks.