RMAN Offline Backup
Recall that an offline backup is a backup of the database while it is not running. Hence, to perform our backup we will
shutdown the database from RMAN and then mount the database. We will perform the backup. Once the backup is
complete we will restart the database again. Here is an example of this process:
RMAN>sql ’alter database open’;
Once this process is complete, you have completed your first backup. Recall that we configured a redundancy of 2 for
the backups. RMAN will reclaim the space from the flash recovery area automatically as required, removing all
unneeded backups. Later in this chapter, we will demonstrate how to recover your database from this backup.
RMAN Online Backups
As the name implies, an online backup allows you to backup the database while users are working. Some newer DBA’s
are a little afraid of online backups, and that somehow they might not work. We assure you that I’ve yet to see a
correctly done online backup fail to be recoverable. Most shops these days use online backups at least for their
production systems. For a large number of shops online backups are the only backups they ever make.
In this section we will walk you through doing an online backup. First, you will need to put your database in
ARCHIVELOG mode as discussed earlier in chapter three of this book.
Then you should configure your database and RMAN as we describe in the above section of this book titled “Configure
the Database and RMAN for our Backup”. Once that is done, you are ready to do an online backup with RMAN.
Online (Hot) Backup of Oracle with RMAN
Once you setup the database and RMAN to support hot backups, doing the backup is insanely easy. In fact, it takes
fewer RMAN commands than an offline backup does, can you believe that? Here is the RMAN command that you will
use to kick off a backup of your database:
RMAN>backup database plus archivelog delete input;
This command will backup your database. Along with the database backup, it will backup all the archived redo logs that
have been generated by your database (see chapter 3 for a discussion on archived redo logs). These archived redo logs
are very important to be able to recover your database so we back them up at the same time.
You can backup archived redo logs by themselves from time to time by issuing this command:
RMAN>backup archivelog all delete input;
Note in both examples the use of the delete input command. This will cause the source archive redo logs to be removed
once they are backed up. Don’t worry, the delete input command will not try to delete your database or datafiles! There
are a number of other options that you may want to explore with regards to backup retention and archived redo log