Read Oracle RMAN 11g Backup and Recovery Online
Authors: Robert Freeman
182
Part II: Setup Principles and Practices
FIGURE 8-7
Database component selection
FIGURE 8-8
Device/drive selection
Chapter 8: Configuring HP Data Protector for Oracle
183
Step 8.
This step allows you to specify detailed configuration. As you can see in Figure 8-9, the three categories each have an Advanced button. You can define pre- and post-execution scripts under Backup Specification Options. You can define backup objects’ protection and report level under Common Application Options. Lastly, you can see an overview of the prepared RMAN
script and disable/enable Data Protector managed control file backup under Application Specific Options. Make your selections and click Next.
Step 9.
You can schedule the configured backup in this step. Specify the dates and times that you want backups performed. Select the Holiday box if you want to indicate that you do not want scheduled backups to run on holidays.
Step 10.
This last step gives you three options:
■
Save as
Save the newly created backup/template.
■
Start Backup
Begin an interactive backup with the current backup specification.
■
Start Preview
Begin an interactive preview (test) of backup with the current backup specification.
If you choose to save the backup specification, you can also preview or start the backup later.
FIGURE 8-9
Advanced configuration
184
Part II: Setup Principles and Practices
Editing the Oracle RMAN Script
You can edit the RMAN script section only after the Data Protector Oracle backup specification has been saved.
To manually edit the RMAN script, in the Context List, select Backup; in the Scoping Pane, expand Backup Specifications; expand Oracle Server; and click the backup specification that you will edit. On the Options tab, click Advanced in the Application Specific Options box. The RMAN script appears with an Edit button. When you click Edit a warning will appear as:
“This operation will save the backup specification now and reopen the editor after the RMAN
Script is saved. Would you like to continue?”
Click Yes and manually configure the script. You can save the configuration by clicking Save.
If the RMAN script contains additional manually entered backup commands—for example, a second backup command for backing up a database that is already listed in the first backup command—the object selection is disabled, and it is only possible to browse the Source tab.
RMAN Backup
Now that you’ve integrated Oracle with Data Protector and configured an RMAN backup on Data Protector, you’ll learn how to run an RMAN backup of a Data Protector integrated Oracle database.
Backup Methods
To start an RMAN backup of a Data Protector integrated Oracle database, you can choose from these three methods:
■ Use either Data Protector GUI or the Data Protector CLI to start an interactive backup of a predefined Oracle backup specification.
■ Use Data Protector Scheduler to schedule a backup of a predefined Oracle backup specification.
■ Use either Oracle Recovery Manager or Oracle Enterprise Manager to start a backup on the Oracle server.
Running an Interactive Backup
To start an interactive backup of an Oracle database using the Data Protector GUI:
1.
In the HP OpenView Storage Data Protector Manager (Data Protector GUI), select Backup in the drop-down menu.
2.
In the left pane, choose Backup | Backup Specifications | Oracle Server.
3.
Right-click the backup specification you want to start and select Start Backup.
Scheduling a Backup
To schedule an Oracle backup specification:
1.
In the HP OpenView Storage Data Protector Manager, select Backup in the drop-down menu.
2.
In the left pane, choose Backup | Backup Specifications | Oracle Server.
3.
Double-click the backup specification you want to schedule and click the Schedule tab.
Chapter 8: Configuring HP Data Protector for Oracle
185
4.
In the Schedule page, select a date in the calendar, and click Add to open the Schedule Backup dialog box.
5.
Specify necessary scheduling options.
Starting Oracle Database Backup Using RMAN or Enterprise Manager
You can also use RMAN CLI or Enterprise Manager to perform backups of Data Protector integrated databases. To use Data Protector backup media in Oracle database backups, you must specify the channel type SBT_TAPE.
Backup Procedure
When a backup is started with Data Protector, the following happens in the background:
1.
Data Protector executes ob2rman.pl, which starts RMAN on the client and sends the preconfigured RMAN script.
2.
RMAN contacts the Oracle server, which contacts Data Protector via the MML interface and initiates the backup.
3.
During the backup session, the Oracle server reads data from the disk and sends it to Data Protector for writing to the backup device.
4.
Messages from the Data Protector backup session and messages generated by Oracle are logged to the Data Protector database.
Restoring Oracle Using the Data Protector GUI
You can restore the following database objects by using both the Data Protector GUI and RMAN:
■ Control files
■ Datafiles
■ Tablespaces
■ Databases
■ Recovery catalog databases
You can also duplicate a database by using the Data Protector GUI. You need to create an Oracle instance in order to restore or duplicate a database.
Before you restore any database item or you duplicate a database, ensure that the database is in the correct state:
Item to Restore
Database State
Control file, duplicating a database
Nomount (started)
All other items
Mount
NOTE
When restoring only a few tablespaces or datafiles, the database can
be open with the tablespaces or datafiles to be restored offline.
186
Part II: Setup Principles and Practices
For restore, RMAN scripts are generated with necessary commands, depending on selections made in the GUI. If you want to perform additional actions, you cannot edit the RMAN restore script, but you can perform the actions manually from RMAN itself.
Restoring the Control File
Depending on the type of the control file backup, three types of restore are possible when restoring the control file:
Restoring from Data Protector Managed Control File Backup (CONTROLFILE
FROM DP MANAGED BACKUP)
The control file was backed up automatically by ob2rman.pl at the end of a backup session, unless the option “Disable Data Protector managed control file backup” was selected.
The recovery catalog is not required for this restore option.
The control files are restored to the following locations:
Windows
HP-UX and Solaris
/var/opt/omni/tmp/ctrl
Other UNIX
/usr/opt/omni/tmp/ctrl
After the restore session finishes, you must run the following script:
run {
allocate channel 'dev0' type disk;
restore controlfile from '
release channel 'dev0';
}
where
Restoring from RMAN Autobackup (CONTROLFILE FROM RMANAUTOBACKUP)
The control file was automatically backed up by RMAN, and the recovery catalog is not available.
Restoring from RMAN Backup Set (CONTROLFILE FROM RMANBACKUPSET)
The recovery catalog is required.
Restoring Oracle Database Objects
To restore Oracle database objects:
1.
Put the database in the mount state.
2.
In the Data Protector GUI, switch to the Restore context.
3.
Under Restore Objects, expand Oracle Server, expand the client on which the database whose objects you’re restoring resides, and then click the database.
4.
In the Restore Action drop-down list, select the type of restore you wish to perform.
5.
In the Results Area, select objects for restore. If you are restoring datafiles, you can restore the files to a new location. Right-click the database object, click Restore As, and in the Restore As dialog box, specify the new datafile location.