patternsqlMinor
SQL Server 2008 R2 - Specify the Full Backup to use when doing a Differential Backup
Viewed 0 times
thefull2008sqldoingdifferentialwhenserverusespecify
Problem
When I backup my Database, I do a Full Backup every day who goes on a tape.
I am trying to use the Sunday's Full backup to set up an additionnal Differential Backup, how can I do this? It only takes the last Full Backup.
Full (Run on Sunday) :
Partial (Run each Day, but use the wrong Full Backup) :
I am trying to use the Sunday's Full backup to set up an additionnal Differential Backup, how can I do this? It only takes the last Full Backup.
Full (Run on Sunday) :
BACKUP DATABASE [DATABASE] TO DISK = N'J:\DATABASE Backup\MyDatabase_Full.bak' WITH NOFORMAT, NOINIT, NAME = N'DATABASE-Full Database Backup', SKIP, NOREWIND, NOUNLOAD, STATS = 10Partial (Run each Day, but use the wrong Full Backup) :
BACKUP DATABASE [DATABASE] TO DISK = N'J:\DATABASE Backup\MyDatabase_Partial_20120105.bak' WITH DIFFERENTIAL , RETAINDAYS = 10, NOFORMAT, NOINIT, NAME = N'DATABASE-Differential Database Backup', SKIP, NOREWIND, NOUNLOAD, COMPRESSION, STATS = 10Solution
You should do the daily backups as copy_only, so that it doesn't break the chain for transaction log backups or differential backups. After that the daily full backup won't be taken into account as basis for the differential backups.
Quote from MSDN:
"COPY_ONLY
Specifies that the backup is a copy-only backup, which does not affect the normal sequence of backups. A copy-only backup is created independently of your regularly scheduled, conventional backups. A copy-only backup does not affect your overall backup and restore procedures for the database.
Copy-only backups were introduced in SQL Server 2005 for use in situations in which a backup is taken for a special purpose, such as backing up the log before an online file restore. Typically, a copy-only log backup is used once and then deleted.
When used with BACKUP DATABASE, the COPY_ONLY option creates a full backup that cannot serve as a differential base. The differential bitmap is not updated, and differential backups behave as if the copy-only backup does not exist. Subsequent differential backups use the most recent conventional full backup as their base."
Quote from MSDN:
"COPY_ONLY
Specifies that the backup is a copy-only backup, which does not affect the normal sequence of backups. A copy-only backup is created independently of your regularly scheduled, conventional backups. A copy-only backup does not affect your overall backup and restore procedures for the database.
Copy-only backups were introduced in SQL Server 2005 for use in situations in which a backup is taken for a special purpose, such as backing up the log before an online file restore. Typically, a copy-only log backup is used once and then deleted.
When used with BACKUP DATABASE, the COPY_ONLY option creates a full backup that cannot serve as a differential base. The differential bitmap is not updated, and differential backups behave as if the copy-only backup does not exist. Subsequent differential backups use the most recent conventional full backup as their base."
Context
StackExchange Database Administrators Q#10203, answer score: 6
Revisions (0)
No revisions yet.