Section 16.1. Two Backup Methods

16.1. Two Backup Methods

The backup and recovery method with the most history is now called user-managed backup. A user-managed backup consists of putting the Oracle database into a "backup friendly" state, then backing up its files using whatever tool strikes your fancy. Once the files have been backed up, you can take the database out of its "backup friendly" state. User-managed backup is documented and supported, but is not what Oracle would prefer you do.

The preferred method of backing up Oracle databases is the Recovery Manager (rman), which was first available in Oracle 8. The rman utility can be used independently or with a commercial backup utility to back up Oracle to disk or tape. It offers a number of advantages over user-managed backups, including incremental backups, data integrity checks, block-level media recovery, and guided restores. Those who have learned rman swear by it, especially the new and improved version available in Oracle 10g.

As of this writing, approximately half the Oracle community is using rman and half is performing user-managed backups. Both methods will be covered in this chapter, starting with this comparison of the two.

16.1.1. rman

rman has a number of advantages over user-managed backups. The first advantage is that rman will get much more research and development funds than user-managed backups. Where user-managed backups haven't changed much in the last several years, dozens of features have been added to rman in that time.

rman also has a number of features that aren't ever going to be available with user-managed backups:

Incremental backups

rman can create backups that contain the blocks that have changed since the last full backup. The speed and performance of incremental backups are significantly enhanced in 10g.

Incrementally updating backups

If you're using disk as the target for rman, it has the ability to take the latest incremental and merge it with the full backup already on disk, creating a new full backup without having to actually perform a full backup.

Data integrity checking

Previously, you had to perform an export of Oracle to check the integrity of blocks on disk. rman now performs this check for you as part of the backup.

Block-level media recovery of a corrupted datafile

If rman identifies any corrupt blocks in a datafile, it can recover them one block at a time.

Directed restores/recoveries

You tell rman to restore the database, and it figures out what needs to be restored and automatically restores it.

Many other features

Oracle has continued to add many features to rman, none of which will be available with user-managed backups.

rman has two disadvantages when compared to user-managed backups: learning curve and cost. While user-managed backups aren't easy to learn either, they've been around a lot longer, and many DBAs understand them. Many DBAs still view rman with trepidation, often due to the large manual they'd have to read. The second disadvantage is that you must either back up to disk or purchase a third-party media manager to allow you to back up to tape. Some environments don't have the money for enough disk to store an entire copy of their database (even if compressed), but they do have a tape drive they can dump/tar/cpio/ntbackup to. If they don't have the money for more disk, they don't have the money for a commercial media manager to back up to tape.

If you want the advantages that rman offers but don't want to purchase your commercial backup utility's interface to it, you can still integrate the two by using rman to back up to a disk, then using your backup utility to back up that disk. It's not perfect, but it's something.

16.1.2. User-Managed Backups

The biggest advantage user-managed backups have is history. Any DBA who has worked with Oracle for a long time probably understands them.

User-managed backups can also be relatively simple, especially if you can shut down the database to do a cold backup. All you have to do is shut it down prior to performing your usual filesystem backup, using whatever tool you want to use. If you can't shut down the database, put it in backup mode and back it up live. (Backup mode is covered later in the chapter.) Once you've run the backup, start up the database or take it out of backup mode.

This procedure allows you to integrate backups of Oracle with any backup utility without having to pay for its interface to rman. While rman is free, your backup utility's interface to it definitely won't be. These interfaces can cost several thousand dollars per server.

This chapter uses the command sqlplus /nolog, followed by connect / as sysdba to connect to Oracle 9i and 10g databases. If you are running Oracle 8i, you can use svrmgrl and connect internal. (In the course of reading this chapter, you'll learn some really great reasons to upgrade to 10g.)

Backup & Recovery
Backup & Recovery: Inexpensive Backup Solutions for Open Systems
ISBN: 0596102461
EAN: 2147483647
Year: 2006
Pages: 237

Similar book on Amazon © 2008-2017.
If you may any questions please contact us: