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 3: Full Database <strong>Backup</strong>s<br />

subject to a moderate level of data modification, but the flexibility of full point-in-time<br />

restore, via log backups, is not required, then the <strong>Backup</strong> SLA can stipulate simply that<br />

nightly full database backups should be taken.<br />

The majority of the development <strong>and</strong> testing databases that I look after receive only a<br />

nightly full database backup. In the event of corruption or data loss, I can get the developers<br />

<strong>and</strong> testers back to a good working state by restoring the previous night's full<br />

backup. In theory, these databases are exposed to a maximum risk of losing just less than<br />

24 hours of data changes. However, in reality, the risk is much lower since most development<br />

happens during a much narrower daytime window. This risk is usually acceptable<br />

in development environments, but don't just assume this to be the case; make sure you<br />

get sign-off from the project owners.<br />

For a database subject only to very infrequent changes, it may be acceptable to take only a<br />

weekly full backup. Here the risk of loss is just under seven days, but if the database really<br />

is only rarely modified then the overall risk is still quite low.<br />

Remember that the whole point of a <strong>Backup</strong> SLA is to get everyone with a vested interest<br />

to "sign off" on acceptable levels of data loss for a given database. Work with the database<br />

owners to determine the backup strategy that works best for their databases <strong>and</strong> for you<br />

as the DBA. You don't ever want to be caught in a situation where you assumed a certain<br />

level of data loss was acceptable <strong>and</strong> it turned out you were wrong.<br />

Preparing for Full <strong>Backup</strong>s<br />

We're going to run through examples of how to take full backups only, using both<br />

SSMS <strong>and</strong> T-<strong>SQL</strong> scripts. Chapter 4 will show how to restore these backups, <strong>and</strong> then<br />

Chapters 5 <strong>and</strong> 6 will show how to take <strong>and</strong> restore log backups, <strong>and</strong> Chapter 7 will cover<br />

differential backup <strong>and</strong> restore. In Chapter 8, we'll show how to manage full, differential<br />

<strong>and</strong> log backups, using a third-party tool (Red Gate <strong>SQL</strong> <strong>Backup</strong>) <strong>and</strong> demonstrate some<br />

of the advantages that such tools offer.<br />

87

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

Saved successfully!

Ooh no, something went wrong!