官术网_书友最值得收藏!

Differential backup

SQL Server maintains an internal structure called a differential map. This structure maps all changes are done in database extends from the last full backup. This is very useful in cases when a transaction log backup is executed often. Let's see an example where the administrator needs to back up a database on a daily basis, similar to our example in the transaction log backup section, but the transaction log backup is executed every ten minutes. It leads to six transaction log backups every hour and to more than a hundred transaction log backups every day. Such an amount of backup raises a risk of unreadability or loss of certain backups and also increases time spent by the restore process. To reduce the risks and the time of restore, the administrator can add the differential backup to his backup strategy. Differential backup has these characteristics:

  • It is a kind of full backup (backups extents changed from the last full backup and do not maintain the transaction log)
  • It is cumulative (backup extents changed from last full backup, hence allows you to skip more transaction log backups during restore)
  • It is faster and smaller than full backup (does not slow down the database for too long and can be executed against user work without decisive influence on performance)
  • It does not need any additional settings on the database or server level

The syntax for differential backup is as follows:

BACKUP DATABASE AdventureWorks TO DISK = 'D:\myBackups\AdventureWorksDiff.bak'
WITH DIFFERENTIAL

From the syntax point of view, differential backup is just a database backup with one more option. Other options such as INIT/NOINIT are also possible. If the use of differential backups is recognized, the timeline of backups will be according to the following table. This table describes a daily-based strategy for smaller databases with all backups stored in the same backup file:

主站蜘蛛池模板: 水城县| 肇源县| 措勤县| 江油市| 建湖县| 若尔盖县| 鲁甸县| 同仁县| 清苑县| 榆中县| 定结县| 思茅市| 仙游县| 宣化县| 定安县| 武穴市| 象山县| 彭泽县| 克拉玛依市| 寿阳县| 衡南县| 遂昌县| 涞水县| 广元市| 台北市| 鄄城县| 昆明市| 宝坻区| 民和| 德兴市| 阿拉善盟| 贞丰县| 石林| 兴隆县| 滦平县| 聂拉木县| 绥德县| 梓潼县| 水城县| 九龙城区| 旅游|