30.06.2013 Views

SQL Server Backup and Restore - Simple Talk

SQL Server Backup and Restore - Simple Talk

SQL Server Backup and Restore - Simple Talk

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter 7: Differential <strong>Backup</strong> <strong>and</strong> <strong>Restore</strong><br />

differential restore on the target server, which also takes only 10–15 minutes to complete,<br />

<strong>and</strong> we are back online <strong>and</strong> running.<br />

We have successfully completed the migration, <strong>and</strong> the down-time has decreased from a<br />

miserable 12 hours to a scant 30 minutes. There is a bit more preparation work to be done<br />

using this method, but the results are the same <strong>and</strong> the uptime of the application doesn't<br />

need to take a significant hit.<br />

Possible issues with differential backups<br />

In most cases in my experience, the potential issues or downsides regarding differential<br />

backups are just minor inconveniences, rather than deal breakers, <strong>and</strong> usually do not<br />

outweigh the savings in disk space usage <strong>and</strong> backup time, especially for larger databases.<br />

Invalid base backup<br />

The biggest risk with differential backups is that we come to perform a restore, <strong>and</strong> find<br />

ourselves in a situation where our differential backup file doesn't match up to the base<br />

backup file we have ready (we'll see this in action later). This happens when a full backup<br />

is taken of which we are unaware. Full database backups are taken for many reasons<br />

outside of your nightly backup jobs. If, for example, someone takes a full backup in order<br />

to restore it to another system, <strong>and</strong> then deletes that file after they are done, our next<br />

differential is not going to be of much use, since it is using that deleted file as its base.<br />

The way to avoid this situation is to ensure that any database backups that are taken<br />

for purposes other than disaster recovery are copy-only backups. In terms of the data it<br />

contains <strong>and</strong> the manner in which it is restored, a copy-only backup is just like a normal<br />

full backup. However, the big difference is that, unlike a regular full backup, with a<br />

copy-only backup, <strong>SQL</strong> <strong>Server</strong>'s internal mechanism for tracking data pages changed<br />

since the last full backup is left untouched <strong>and</strong> so the core backup strategy is unaffected.<br />

212

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!