Problem solve Get help with specific problems with your technologies, process and projects.

Oracle backups with RMAN

Using RMAN from Oracle helps perform backups.

If you are going to be a good Oracle DBA, you have to tackle the subject of Oracle backups. You need to decide, first of all whether to use a third-party tool, or write your own Oracle backup routines from scratch. I prefer the former. My current Oracle backup tool of choice is RMAN--it's from Oracle, and it's free. Writing your own backup software is fine if you know what you really know what you're doing.

RMAN has some great features for backups, including a catalog of your backups, easy integration with your media management software (e.g., HP OmniBack or Legato), incremental backups, and the multiplexing of writes.

My favorite RMAN feature has to be the incremental backup. This works just like a smart file system incremental backup, backing up only the changed blocks in the database. This really helps shorten the backup window and reduces the time of heavy I/O during the backups.

Recovery with RMAN is almost too easy. The first time I tested a recovery, I thought I was missing some steps. In the $ORACLE_HOME/rdbms/demo directory are four RMAN demo scripts (case1.rcv - case4.rcv) that provide great examples of all kinds of recovery scenarios. The most basic recovery script (for a full database recovery) has only three commands: allocate tapes, restore database, and release tapes. The RMAN catalog figures out what tapes and files it needs, and you sit back and let it do all the work.

When you set up the backup, make sure that all archive logs get placed on more then one tape. I like to let RMAN back up the archive logs as part of it's backup scripts, then back up the archive log destination using a file-system backup, after RMAN has completed its work, to a different tape. As anyone who has had to perform a restore can attest, the weakest link is always the tape. Make sure you cover yourself by getting those archive logs on more then one tape. Archive logs are the lifeblood of the database. If you are missing any, you won't be able to recover to the current point in time. I like to keep the archivelogs around for 2 days (of course, you have to have the space). That way they are on at least 4 tapes, and available on disk for recovery.

The final, and most important, part of any backup strategy is testing the recovery ahead of time. Everyone knows this is important, but I can't tell you how many clients I have seen who have never performed a database recovery, until they are down. Test the recovery on both test and production systems (if possible), and make sure you have the recovery steps down pat. You don't want to make any mistakes when the whole company is waiting for a database in an emergency.

About the Author

James Giordano is an Oracle database administrator. He has been working with Oracle for about seven years, and also has experience with UNIX and PeopleSoft/Oracle financials.

For More Information

Dig Deeper on Oracle and SQL

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.