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

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:

主站蜘蛛池模板: 靖安县| 安陆市| 延长县| 日照市| 潮安县| 兴文县| 兴文县| 招远市| 庆安县| 句容市| 阿尔山市| 玛多县| 奇台县| 雷州市| 巩义市| 定襄县| 南江县| 宣城市| 治多县| 绥棱县| 和田县| 蒙城县| 兴义市| 柘荣县| 汽车| 大悟县| 五家渠市| 丹巴县| 河津市| 临桂县| 曲松县| 盱眙县| 英山县| 徐闻县| 扶沟县| 科技| 平定县| 焦作市| 泰和县| 上杭县| 夹江县|