IT tutorials
 
Technology
 

SQL Server 2008 : Backup options (part 1) - Backup location and retention policy

10/12/2013 9:24:37 PM
- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Malwarebytes Premium 3.7.1 Serial Keys (LifeTime) 2019

SQL Server 2008 includes a rich array of options that can be employed as parts of a customized backup and recovery strategy. In this section, we'll consider three such options: checksums, backup mirroring, and transaction log marks. But before we cover these options, let's have a look at an important part of any backup strategy: the backup location and retention policy.

1. Backup location and retention policy

A key component of a well-designed backup strategy is the location of the backups: disk or tape (or both). Let's consider each of these in turn before looking at a commonly used backup retention policy.

Tape

Historically, organizations have chosen tape media as a backup destination in order to reduce the cost of online storage while retaining backups for long periods of time. However, a tape-only approach to backups presents a number of challenges:

  • Tape systems typically have a higher failure rate when compared to disk.

  • Typically, tapes are rotated offsite after a predefined period, sometimes as soon as the morning after the backup. Should the backup be required for restore, there may be a time delay involved in retrieving the tape for restore.

  • Depending on the tape system, it may be difficult/cumbersome to restore a tape backup to a different server for restoration verification, or to use it as a source for DBCC checks or other purposes.

In addressing these concerns, disk backups are frequently used, although they too have some challenges to overcome.

Disk

Due to some of the limitations with the tape-only approach, backup verification, whereby backups are restored on a regular basis to ensure their validity, are often skipped. As a result, problems are often discovered for the first time when a real restore is required.

In contrast to tape, disk-based backups offer the following advantages:

  • When required for a restore, they are immediately available.

  • Disk media is typically more reliable than tape, particularly when RAID protected.

  • Disk-based backups can be easily copied to other servers when required, making the verification process much simpler compared with a typical tape-based system.

Despite its advantages, a disk-based backup approach has some drawbacks. The main one is the extra disk space (and associated cost) required for the backup files. Further, the cost advantage of tape is fully realized when considering the need to store a history of backups—for example, daily backups for the last 30 days, monthly backups for the past 12 months, and yearly backups for the last 7 years. Storing all of these backups on disk is usually more expensive compared to a tape-based system, not to mention the risk of losing all of the disk backups in an environmental disaster.

With the introduction of third-party backup compression tools and the inclusion of backup compression as a standard feature of SQL Server 2008 (Enterprise edition), the cost of disk storage for backups is significantly reduced, but the overall cost is still typically higher than a tape-based system.

In addressing the negative aspects of both tape and disk, a common approach is to combine both methods in what's known as a disk then tape approach.

Disk then tape

As shown in figure 1, the ideal backup solution is to combine both disk and tape backups in the following manner:

  1. Database backups are performed to disk.

  2. Later in the day/night, the disk backup files are archived to tape in the same manner as other files would be backed up (documents, images and so forth).

  3. Typical restore scenarios use the most recent backup files on disk. After a number of days, the oldest disk-based backup files are removed in order to maintain a sliding window; for example, the past 5 days of backups are stored on disk.

  4. If older backups are required, they can be sourced from tape.

The advantages of such a system are numerous:

  • Backups are stored in two locations (disk and tape), thus providing an additional safety net against media failure.

    Figure 1. The disk then tape backup methodology provides fast restore, dual backup protection, and long-term archive at a moderate cost.
     
  • The most common restore scenario, typically that of the previous night's backup, is available on disk for fast restore without requiring tapes to be requested from offsite.

  • A full history of backups is available for restore from tape.

  • The cost of the overall system is reduced, while still providing all of the advantages of disk-based backups for the most common restore scenarios.

A variation on this approach is using SAN-based backup solutions.Most of the enterprise-class SANs available today provide several methods of snapping, or cloning, LUNs in order to provide near instant backup/restore solutions. Once snapped, the cloned LUN can be archived to tape, thereby providing long-term storage like the disk then tape approach. If using these backup types, take care to ensure the backup method used is SQL Server compatible and enables transaction log roll forwards for point-in-time recovery.

Regardless of the backup destination, an important consideration is how long to retain the backups before deleting or overwriting them.

Backup retention

Assuming the disk then tape backup method is used, the retention period for each location needs to be considered separately. For the disk backups, the retention period is dependent on the backup model. For example, if a weekly full, nightly differential system is in place, then the weekly backup would need to be retained on disk for the whole week for use with the previous night's differential backup. If disk space allows, then additional backups can be retained on disk as appropriate.

In considering the tape rotation policy (how long to keep a tape before overwriting it), the classic rotation policy typically used is the grandfather-father-son (GFS) system, whereby 22 tapes are used per year.

The GFS tape rotation policy, as shown in table 1, uses 6 sons, 3 fathers, and 13 grandfathers (52 weeks per year divided by 4-week periods) for a total of 22 tapes per year. Optionally, one of the grandfather tapes can be retained as a yearly backup tape for a period of years.

Table 1. Grandfather-father-son tape rotation policy
 
WeekMonTueWedThuFriSatSun
1Son1Son2Son3Son4Son5Son6Father1
2Son1Son2Son3Son4Son5Son6Father2
3Son1Son2Son3Son4Son5Son6Father3
4Son1Son2Son3Son4Son5Son6Grandfather-x

Regardless of the disk location and retention period, ensuring backups are valid is an important consideration. Short of actually restoring each backup, one of the options available for detecting media failure is to use backup checksums.

 
Others
 
- SQL Server 2008 : Recovery models and data loss exposure
- SQL Server 2008 : Backup types (part 3) - Transaction log backup, COPY_ONLY backups
- SQL Server 2008 : Backup types (part 2) - Differential backup
- SQL Server 2008 : Backup types (part 1) - Full backup
- Windows 8 : Installing and Maintaining Devices (part 3) - Installing Local and Network Printers
- Windows 8 : Installing and Maintaining Devices (part 2) - Installing Wireless, Network, and Bluetooth Devices
- Windows 8 : Installing and Maintaining Devices (part 1) - Installing Preexisting Devices, Installing Internal, USB, FireWire, and eSATA Devices
- Windows 8 : Working with the Automated Help and Support System (part 3) - Working with Support Services, Managing Services Using Preferences
- Windows 8 : Working with the Automated Help and Support System (part 2) - Customizing Automated Help and Support
- Windows 8 : Working with the Automated Help and Support System (part 1) - Using Automated Help and Support
 
 
Top 10
 
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
Technology FAQ
- Is possible to just to use a wireless router to extend wireless access to wireless access points?
- Ruby - Insert Struct to MySql
- how to find my Symantec pcAnywhere serial number
- About direct X / Open GL issue
- How to determine eclipse version?
- What SAN cert Exchange 2010 for UM, OA?
- How do I populate a SQL Express table from Excel file?
- code for express check out with Paypal.
- Problem with Templated User Control
- ShellExecute SW_HIDE
programming4us programming4us