Home > Data Backup Tips > Backup and recovery > SQL Server data backup and recovery best practices
Data Backup Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

BACKUP AND RECOVERY

SQL Server data backup and recovery best practices


Rick Cook
11.02.2009
Rating: --- (out of 5)


Storage technology learning materials
Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


A functioning SQL Server application is actually a collection of databases. In addition to the data itself, it includes the transaction log and the system databases. All of this must be protected if the application is to be restored smoothly. The following are some SQL Server backup and recovery tips and best practices.

Unlike many programs, SQL Server allows backups while users are active and transactions are being processed. This means you can back up while the system is in use. But since a SQL Server backup sucks up resources, especially I/O, it is best to perform full backups during periods when the system is lightly loaded.

Shorten your data backup period

If overall performance is suffering due to long backup times, there are several things you can do to shorten the backup period. One way to shorten backups is to use backup data compression. Another way to shorten the backup time is to back up your database to disk. However, if you back up to disk, do not back up to the same disk used to store the database or the transaction log. That not only impacts performance, it can affect recoverability if the disk fails.

Mix and-match backup methods

SQL Server offers three basic backup methods: Full, differential and transaction. These are backup options built into SQL Server and you don't need a separate backup app. A full backup backs up everything. It is the most complete, takes the longest and uses the most resources. A differential backup only backs up what has changed since the last full backup. This makes for faster backups, but slower restores since the dat...


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google



RELATED CONTENT
Backup and recovery
Criteria for choosing the right tape encryption solution for your data backup plan
Creating a System Recovery Disk in Windows 7: A step-by-step tutorial
Modern data backup and recovery system considerations
Secure your data backups with encryption key management best practices
Using data deduplication with backup applications: Source vs. target dedupe
Data backup for virtual machines: Alternative methods to VMware Consolidated Backup
Upgrading from LTO-3 to LTO-4 tape for data backup and recovery
Is VMware Consolidated Backup right for your enterprise?
Is cloud data backup service right for your organization?
Are data backup vendor certifications valuable for backup administrators?

Data storage backup tools
HP expands laptop and desktop data backup with Data Protector Notebook Extension
Data backup and recovery news briefs: Rackspace unveils cloud-based file storage apps
EMC gives Avamar desktop and laptop support
Terremark acquires managed data backup and recovery provider DS3 DataVaulting
Data backup and recovery news briefs: Dynamic Solutions introduces data deduplication products
Creating a System Recovery Disk in Windows 7: A step-by-step tutorial
Modern data backup and recovery system considerations
Data backup and recovery news briefs: Thales Group releases CryptoStor Tape 3.0 appliance
Data archiving reduces data backup workload prior to data deduplication
Symantec releases Linux version of Backup Exec System Recovery

Disk-based backup
Texas Tech turns to data deduplication for data backup, disaster recovery
EMC gives Avamar desktop and laptop support
Modern data backup and recovery system considerations
Arkeia takes aim at EMC Avamar with Kadena Systems data deduplication IP buy
Data backup and recovery vendors dig into deduplication technology, aim for cloud backup
Quantum launches midrange data deduplication backup appliances
Data backup news briefs: ProStor Systems ships InfiniVault removable disk backup appliance for SMBs
BakBone phasing out virtual tape library, adds data deduplication with NetVault Backup 8.5
EMC's Slootman: No data deduplication for Disk Library virtual tape library
W. Curtis Preston: Articles and podcasts on data backup and recovery

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary


abase must be reconstructed. A transaction log backup simply backs up the transaction log since the last transition log backup. It is quite fast, but reconstructing the database from a chain of transaction log backups is the slowest method of recovery.

In addition to these three methods of backing up the entire database, SQL Server also allows you to back up files or file groups individually. This can be useful for protecting important files or for backing up very large databases.

Choosing the backup method that's best for your company depends on the nature of the database being protected, specifically how frequently it changes, how large it is and how important it is to the enterprise. Some databases are not too large and change relatively infrequently. They can be backed up with full backups done on a daily or even weekly schedule. Others, especially transactional databases that are mission critical, should receive full backups as often as feasible

Back up the transaction log frequently

Next to the database itself, the transaction log is the most critical data in a SQL Server database. The transaction log covers all activity and can be used to do point-in-time (PIT) restorations. The advantage of the transaction log is that it can be backed up frequently, keeping it very up-to-date. It also has PIT or near-PIT backups between more conventional backups. Note that a transactional backup only backs up to the last transactional backup. That can mean having to restore a chain of transactional backups to get a full restore. The power of a transaction log backup comes in its ability to restore up to the minute, or nearly so.

The transaction log should be backed up several times a day. Many organizations back it up every 10 minutes or so if they have an active database such as a transactional database.

Backing up SQL Server system databases

The other vital component of a SQL Server application is the system databases, including msdb and master. These contain vital information like system configuration and are needed in the event of a complete restore. These change less frequently and should be backed up at least weekly, or daily in an active (where data transactions occur frequently) environment. In the case of the master database, backups should be made at least whenever there is a change in server or database level configuration settings or any change in the details of logon accounts. You you can back up the system databases while the application is running.

Back up the system partition at least with every configuration change

The system partition isn't technically part of SQL Server, but un-backed up system partition can render a database difficult to recover. It's important to keep an up-to-date backup of the system partition, which means backing up at least every change in the system configuration; regular backups are even better.

Practice database security

Make sure your database is properly secured. For example, when using the file system for backups, you should only grant file and folder access to the SQL service account and the DBA.

Don't use the password option in the backup statement to password-protect the backup. It is deprecated and slated for removal from future versions of SQL Server.

Use the checksum option of the Backup command when making backups and test your backups regularly using the Restore Verifyonly command.

Finally, make sure your security patches are up-to-date and properly installed -- not just on SQL server, but on the underlying operating system and hardware.

About this author: Rick Cook specializes in writing about issues related to storage and storage management.


Rate this Tip
To rate tips, you must be a member of SearchDataBackup.com.
Register now to start rating these tips. Log in if you are already a member.




DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



Enterprise Backup Solutions - Continuous Data Protection (CDP)
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2008 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts