Database Backups Using Virtual Tape VolumesBy Drew Robb
January 23, 2007
A lengthy database recovery process can cost a company its shirt. Database downtime in large companies, in turns out, can equate to millions in losses or potential losses. Customers are left on wait, personnel can't complete their tasks and prospective new business is lost.
One solution is virtual tape library (VTL) technology. Virtual tape is a high capacity nearline storage alternative that can be relied upon for fast access time and performance.
"Virtual tape offers an alternative to expensive disk storage and physical tape cartridge dependencies," says Kathy Hodge of Sun Microsystems Inc. of Santa Clara, CA.
Database backup and recovery, of course, encompasses the strategies and procedures involved in protecting a database against data loss. Thus the database can be restored regardless of the type of data loss event experienced — system crashes, media failure, application software errors, natural disasters, user errors or sabotage.
As databases are generally stored on high-end primary disk storage, RAID technology is used that can conduct disk reconstruction automatically after a disk failure. RAID, however, is not enough. It has to be supplemented by some form of backup. Traditionally, tape systems are used. But this is often too slow for database recovery.
"One of the delays experienced by the database administrator is identifying which cartridges contain the backup files, and retrieving the database backup files from the physical tape cartridges," says Hodge. "This delay in recovery time can be minimized by storing the database backup files on virtual tape volumes in VTLs as well as on physical cartridges in automated tape libraries."
Database Backup Using VTL
When it comes to very large databases (VLDB), tape transfer speeds typically restrict backup copies to only one per day. This can cause a problem due to SLA requirements that don't permit any downtime at all for routine backups.
Cold backups, also known as offline backups, are done when the database is offline and thus not accessible for updating. If the SLA forbids downtime, then a cold backup can't be done. One solution is the hot database backup which can be performed while the database is online, even though it is actively accessible to users and may currently be being updated.
A hot backup can be done by copying all files associated with the database to a virtual tape volume while the database is running. Those files can then be copied to physical tape for archiving.
"This initial backup set of files is staged on disk in preparation for a tape backup routine to copy the disk backup data to tape," says Hodge. "Virtual tape technology can be used to store the database backup files instead of expensive primary disk storage."
In many companies, production disk capacity constraints often only allow for one backup copy at a time to be stored on disk for very large databases. In this situation, virtual tape solutions on nearline disk can be used to accommodate multiple backup versions, depending on the database backup requirements.
Oracle's Recovery Manager (RMAN), for example, can be used to either write to tape using the Media Management Layer (MML) or backup to primary disk. Third party media management vendors can leverage RMAN to provide backup systems and VTL setups for Oracle databases.
"Oracle's RMAN is a server-managed backup and recovery utility that can backup/restore one or more data files to disk or tape," says Hodge. "The production database can be backed up to a staged-disk location, then copied or snapped to an online disk location for transfer to virtual tape, then finally to physical tape cartridges for archival."
Hodge suggests backing up and restoring in a test environment before moving to a production system. Performing test recoveries regularly ensures that the archiving, backup, and recovery procedures work as intended. This also helps the database administrator stay familiar with recovery procedures, so that they are less likely to make a mistake in a crisis. In Oracle, for example, it is possible to create a new database from the backup copy, or a standby database.
How much difference does VTL make in a VLDB environment? Hodge reports that some IT shops went from averaging 2 to 3MB/sec using physical tape to well over 30MB/sec. using virtual tape. Further, when restoring a database file, the data is immediately accessible from virtual tape (in reality within a few seconds) compared to anywhere from minutes to days for tape restores.
Many VTLs can be configured to automatically copy the virtual tape backup to physical tape. This automation capability for database backups eliminates the concerns about timing of completion of the database backup to physical tape. The process can be set up to done at any time or immediately after the database backup occurs.
"When the source backup required for the restore is located on virtual tape, database files can be recovered faster than when the backup is on physical tape," says Hodge. "Virtual tape also eliminates the time consuming effort to insert, remove, label and organize numerous tapes in physical tape libraries."