SQL Saturday - Backup Strategies are for Losers

26
Backup Strategies are for Losers! Ed Watson, MVP Ambassador of Mayhem Twitter: @SQLGator Blog: SQLGator.com LinkedIn: LinkedIn.com/in/WatsonEd

Transcript of SQL Saturday - Backup Strategies are for Losers

Page 1: SQL Saturday - Backup Strategies are for Losers

Backup Strategies are for Losers!

Ed Watson, MVPAmbassador of Mayhem

Twitter: @SQLGatorBlog: SQLGator.comLinkedIn: LinkedIn.com/in/WatsonEd

Page 2: SQL Saturday - Backup Strategies are for Losers

Every company has a backup strategy. That backup strategy is worthless and will cause your business to fail miserably while losing valuable customer data and more importantly you will lose my order of chicken wings!

9/26/2015 |Backup Strategies are for Losers!

2 |

Abstract for today’s session

Page 3: SQL Saturday - Backup Strategies are for Losers

9/26/2015 |Backup Strategies are for Losers!

3 |

Don’t lose my chicken wings!

Page 4: SQL Saturday - Backup Strategies are for Losers

What can you take away from today?1. What is a Recovery Strategy?2. Create your Recovery Point and

Recovery Time Objectives3. Selecting the Proper Backup

Type and Recovery Model9/26/2015 |Backup Strategies are for

Losers!4 |

Goals for today’s session

Page 5: SQL Saturday - Backup Strategies are for Losers

9/26/2015 |Backup Strategies are for Losers!

5 |

Backups are the most important job we do!

Page 6: SQL Saturday - Backup Strategies are for Losers

Backup & Recovery Best Practices

Page 7: SQL Saturday - Backup Strategies are for Losers

Separate Databas

e

Is your backup on another drive?

Page 8: SQL Saturday - Backup Strategies are for Losers

Separate Databas

e

Backup Schedul

e

Do you have a backup schedule?

Page 9: SQL Saturday - Backup Strategies are for Losers

9 |

Page 10: SQL Saturday - Backup Strategies are for Losers

Separate Databas

e

Backup Schedul

eVerify

Options

Are you using verify options?

Page 11: SQL Saturday - Backup Strategies are for Losers

Verify Restore

s

Separate Databas

e

Backup Schedul

eVerify

Options

Best Practices Circle of Awesomeness!!!

Page 12: SQL Saturday - Backup Strategies are for Losers

9/26/2015 |Backup Strategies are for Losers!

12 |

This is a story about NEd ~ Jr DBA

Ed got successful backup notifications

Ed thought VERIFY meant his backup would be good when it was successful

Ed never heard of DBCC CHECKDB

Ed never ran DBCC CHECKDB on his databases nor did he restore them!

Page 13: SQL Saturday - Backup Strategies are for Losers

9/26/2015 |Backup Strategies are for Losers!

13 |

Backup Strategies Are For Losers…

of DATA!Recovery

Strategies are for Winners!

Page 14: SQL Saturday - Backup Strategies are for Losers

How do we backup this data? How do we restore logins, jobs, linked

servers, system configuration settings, etc. Are you backing up the resource database? How are we going to recover this data in the

event of a failure? How much data can we afford to lose in the

event of a failure? How quickly does this data need to be

restored and operational?

So what is a recovery strategy?

Page 15: SQL Saturday - Backup Strategies are for Losers

What can you take away from today?1. What is a Recovery

Strategy?

9/26/2015 |Backup Strategies are for Losers!

15 |

Quick Review

Page 16: SQL Saturday - Backup Strategies are for Losers

RPO RTO

Create your RPO and RTO

DISASTER STRIKES

Last Good Backup Point

Systems Recovered

How Long to Recover?How Far Back?

Page 17: SQL Saturday - Backup Strategies are for Losers

What can you take away from today?1. What is a Recovery Strategy?2. Creating your Recovery

Point and Recovery Time Objectives

9/26/2015 |Backup Strategies are for Losers!

17 |

Review

Page 18: SQL Saturday - Backup Strategies are for Losers

FullDifferentialTransaction Log

Backup Types

Page 19: SQL Saturday - Backup Strategies are for Losers

Recovery ModelsSimpleBulk-Logged

Full

Page 20: SQL Saturday - Backup Strategies are for Losers

What can you take away from today?1. What is a Recovery Strategy?2. Creating your Recovery Point

and Recovery Time Objectives3. Selecting the Proper Backup

Type and Recovery Model

9/26/2015 |Backup Strategies are for Losers!

20 |

Quick Review

Page 21: SQL Saturday - Backup Strategies are for Losers

1. Identify your applications and associated databases

2. Negotiate the RPO and RTO with your customer within their requirements

3. Create a backup strategy that supports your recovery strategy

Putting it altogether into a strategy

Page 22: SQL Saturday - Backup Strategies are for Losers

4. Implement and test your recovery strategy.

5. Remember that timing is everything.

6. Document the strategy!7. Update the strategy

document regularly.

Putting it altogether into a strategy

Page 23: SQL Saturday - Backup Strategies are for Losers

What can you take away from today?1. What is a Recovery Strategy?2. Creating your Recovery Point and

Recovery Time Objectives3. Selecting the Proper Backup Type and

Recovery ModelPutting it all together into a

Recovery Strategy!9/26/2015 |Backup Strategies are for

Losers!23 |

Final Review

Page 24: SQL Saturday - Backup Strategies are for Losers

1. Make sure you are not storing your backups in the same physical location as the database files. When your physical drive goes bad, you should be able to use the other drive or remote location that stored the backups in order to perform a restore. Keep in mind that you could create several logical volumes or partitions from a same physical disk drive. Carefully study the disk partition and logical column layouts before choosing a storage location for the backups.

2. Make sure you have a proper backup schedule established according to the needs of the application and business requirements. As the backups get old, the risk of data loss is higher unless you have a way to regenerate all the data till the point of failure.

9/26/2015 |Backup Strategies are for Losers!

24 |

Best Practices for Backups

Page 25: SQL Saturday - Backup Strategies are for Losers

3. Use the verification options provided by the backup utilities [BACKUP TSQL command, SQL Server Maintenance Plans, your backup software or solution, etc].

4. Use advanced features like BACKUP CHECKSUM to detect problems with the backup media itself.

5. Make sure to actually restore the backups on a test server and verify that you can restore with all the options and conditions you need to use during a planned or un-planned downtime.

9/26/2015 |Backup Strategies are for Losers!

25 |

Best Practices for Backups (con’t)

Page 26: SQL Saturday - Backup Strategies are for Losers

Thank you!Ed Watson, MVPTwitter: @SQLGatorBlog: SQLGator.comLinkedIn: LinkedIn.com/in/WatsonEd