Oracle® Secure Backup Administrator's Guide Release 10.1 Part Number B14234-02 |
|
|
View PDF |
This chapter explains how to use RMAN with Oracle Secure Backup. This chapter contains the following topics:
Oracle Secure Backup serves as a media management layer for Recovery Manager (RMAN) through the SBT interface. In this capacity, Oracle Secure Backup provides the same services for RMAN as other third-party SBT interfaces. Oracle Secure Backup provides the following additional features:
Its SBT library is the only interface that supports RMAN-encrypted backups directly to tape.
It is better integrated with Oracle Enterprise Manager than other media managers.
You can use Oracle Secure Backup with the following product releases:
Oracle9i Database and Oracle Database 10g
Oracle Enterprise Manager 10g (10.2)
This section contains the following topics:
This chapter assumes that you are familiar with Recovery Manager. The RMAN environment includes the following basic components:
RMAN client
The RMAN client program, which is installed automatically with an Oracle database, initiates database backup and recovery. The RMAN client can back up and recover any Oracle database accessible locally or through Oracle Net so long as it meets compatibility requirements.
The target is the database that RMAN backs up or restores. The RMAN repository, which is the metadata that RMAN uses to manage backup and recovery, is stored in the control file of the target database.
The recovery catalog is an optional database schema that serves as a secondary repository of RMAN metadata. You can create a centralized recovery catalog in a database to store the metadata for multiple target databases.
When performing RMAN backup and restore operations by means of the Oracle Secure Backup SBT interface, you can use the following interfaces:
RMAN command-line client
The rman
executable is located in the $ORACLE_HOME/bin
directory of a database installation. Note the following considerations when using the RMAN command-line client with Oracle Secure Backup:
The RMAN client can run from any Oracle home, regardless of whether the computer containing this home is a member of the Oracle Secure Backup administrative domain.
The target database host must be a member of the Oracle Secure Backup administrative domain.
The target database uses the Oracle Secure Backup SBT interface on the target host to communicate with the Oracle Secure Backup administrative domain.
Oracle Enterprise Manager 10g Database Control
You can manage single-instance database operations, including backup and recovery, through the Database Control console. Note the following considerations when using Enterprise Manager Database Control with Oracle Secure Backup:
The Database Control console must run on the same host as the target database.
The Database Control console must run on the administrative server of the Oracle Secure Backup domain.
Oracle Enterprise Manager 10g Grid Control
You can use the Grid Control console to manage multiple databases. Note the following considerations when using Enterprise Manager Grid Control with Oracle Secure Backup:
The Grid Control console can run on any database host in the administrative domain. Unlike Database Control, Grid Control does not need to run on the administrative server of the Oracle Secure Backup domain.
You can manage SBT backups of all databases in the Oracle Secure Backup administrative domain through Grid Control.
You can create a centralized RMAN recovery catalog in the same database that contains the Grid Control repository.
When you use version 10.2.0.2 Grid Control, you can use Oracle Secure Backup on a host that runs an Oracle Database 10g Release 1 (10.1) or earlier database, as long as the repository for Enterprise Manager is in an Oracle Database 10g Release 2 database.
How you use RMAN in conjunction with Oracle Secure Backup depends on the configuration of your administrative domain. This section describes two typical scenarios.
In a single-host administrative domain, one host plays the role of administrative server, media server, and client. An Oracle database is installed on this host. Figure 6-1 illustrates a typical single-host scenario.
Figure 6-1 Single-Host Administrative Domain
Because the database is installed on the administrative server, you can use Enterprise Manager Database Control console to perform database backup and restore operations involving Oracle Secure Backup. This chapter is written from the perspective of the administrator of a single-host domain that is configured like the one in Figure 6-1.
In a typical multiple-host administrative domain, the administrative server, media server, and clients are on separate hosts. A single administrative domain can include only one administrative server but may include multiple media servers and clients.
Figure 6-2 illustrates a typical multiple-host domain in which each client host runs an Oracle database. In this example, the administrative server and media server do not run databases. The Windows database includes a centralized recovery catalog to store RMAN metadata for backups of all databases in the domain.
Figure 6-2 Multiple-Host Administrative Domain
Because the target databases do not reside on the administrative server, you cannot use Enterprise Manager Database Control to back them up through the Oracle Secure Backup SBT interface. You can use Grid Control on one of the clients, however, to initiate SBT operations involving all databases in the administrative domain.
Regardless of the domain configuration and the front-end interface that you use to manage backup and recovery, the process by which RMAN communicates with the Oracle Secure Backup SBT library is the same.
Figure 6-3 displays the basic components of RMAN backup and restore operations that use the Oracle Secure Backup SBT interface.
Figure 6-3 RMAN and the Oracle Secure Backup SBT Interface
The basic process for RMAN backup and restore operations with Oracle Secure Backup is as follows:
The user starts the RMAN client (either through the command line or the Enterprise Manager console), allocates an SBT channel, and executes a BACKUP
or RESTORE
command.
When the channel is allocated, a server session starts on the Oracle database.
The server session on the database host makes the backup or restore job request through the Oracle Secure Backup SBT library.
Oracle Secure Backup creates the backup or restore job and assigns it a unique identifier such as sbt/15
. Refer to Oracle Secure Backup Reference for a description of job identifiers.
For backups, Oracle Secure Backup immediately tries to reserve and start the appropriate resources, for example, reserve the tape drive and load a tape. If the resource is unavailable, then Oracle Secure Backup queues the job while it waits for the resource to become available.
Note:
You can control how long a job waits in the queue through thermanresourcewaittime
operations policy (set to forever
by default), the --waittime
option in a backup storage selector, or the RMAN parameter OB_RESOURCE_WAIT_TIME
(see "Setting Media Management Parameters in RMAN").For RMAN restore operations, the start time depends on the setting of the rmanrestorestartdelay
policy in the operations
policy class.
Oracle Secure Backup creates or restores the backup pieces.
For backups, Oracle Secure Backup stores metadata about RMAN backup pieces in the Oracle Secure Backup catalog.
The Oracle Secure Backup catalog is stored and managed completely separately from the RMAN recovery catalog. Oracle Secure Backup stores and reports metadata about the contents of each backup piece.
See Also:
Oracle Secure Backup Reference to learn about defaults and policiesTo configure Oracle Secure Backup for use with RMAN, perform the following steps in Oracle Secure Backup:
Configure RMAN access to the Oracle Secure Backup SBT interface. If you are using Enterprise Manager Database Control, then this step involves registering the administrative server with Enterprise Manager.
This step is explained in "Configuring RMAN Access to the Oracle Secure Backup SBT Library".
Create a preauthorized Oracle Secure Backup account for use by RMAN.
This step is explained in "Creating a Preauthorized Oracle Secure Backup Account".
Optionally, create media families for datafiles and archived redo logs. By default RMAN uses the RMAN-DEFAULT
media family.
This step is explained in "Creating Media Families for RMAN Backups".
Optionally, configure database backup storage selectors or RMAN media management parameters. These settings give you more fine-grained control over backup behavior.
These steps are explained in "Creating a Database Backup Storage Selector" and "Setting Media Management Parameters in RMAN".
You can perform the preceding tasks in Enterprise Manager or the Oracle Secure Backup Web tool or command-line interfaces. Where possible, this section explains how to perform these tasks through the Enterprise Manager Database Control console.
If you use Enterprise Manager Database Control, then configure RMAN access to Oracle Secure Backup. This preliminary task is described in "Registering an Administrative Server in Enterprise Manager". You need only specify the Oracle Secure Backup home directory. RMAN locates the SBT library automatically.
By default, RMAN looks in a platform-specific default location for the SBT library. On UNIX/Linux, the default library filename is /lib/libobk.so
, with the extension name varying according to platform: .so
, .sl
, .a
, and so on. On Windows the default library location is %WINDIR%\System32\orasbt.dll
.
When you install Oracle Secure Backup on Linux and UNIX, the installer automatically performs the following tasks:
Copies the SBT library to the lib
subdirectory of the Oracle Secure Backup home
Creates a symbolic link to the library in the /lib
or /usr/lib
directory
By default, RMAN searches the standard path and loads the Oracle Secure Backup SBT library when an SBT channel is allocated.
RMAN backup and restore operations that make use of Oracle Secure Backup involve interaction between the following users:
The Oracle Secure Backup user who processes the backup or restore request
Note that this user must have the following rights:
access Oracle backups
(set to owner
, class
, or all
)
The operating system user under which the database server session is running
Typically, the server session runs under the oracle
operating system account. Oracle Secure Backup honors SBT requests only if the requesting operating system user accesses Oracle Secure Backup as a user with the correct rights.
As explained in "Assigning Preauthorized Access", you can preauthorize an operating system user to access an Oracle Secure Backup account as a specified user. In the case of RMAN SBT backups, Oracle Secure Backup preauthorizes an operating system user to perform backup and restore operations as an Oracle Secure Backup user with the appropriate rights.
Figure 6-4 illustrates the basic process in which a preauthorized operating system user submits a backup or restore request to Oracle Secure Backup.
Figure 6-4 Preauthorization for Database Backup and Restore Operations
The preauthorization of the operating system user works as follows:
When you start RMAN and allocate an SBT channel, Oracle Database starts a server session.
The server session uses the SBT library to communicate with the obproxyd
daemon running locally on its host.
The local obproxyd
daemon determines which operating system user the server session runs under. Assume in this example that the operating system user is named oracle
and runs on Linux host brhost2
.
The local obproxyd
daemon checks the operating system user information with the administrative server observiced
daemon. If the operating system user on this host and operating system is preauthenticated as an Oracle Secure Backup user, then the login to Oracle Secure Backup is successful.
For example, assume that the oracle
operating system user on host brhost2
is preauthorized to run as Oracle Secure Backup user obuser
. Assume also that obuser
is a member of the oracle
class, which is assigned the perform Oracle backups and restores
right by default.
The server session uses the Oracle Secure Backup user to back up or restore files.
The Oracle Secure Backup operations submitted through the SBT interface use the operating system user defined by the Oracle Secure Backup user to access the host. In the example shown in Figure 6-4, the backup and restore operations run under the oracle
operating system account on brhost2
.
This section explains how to configure an RMAN preauthorization. You can preauthorize the operating system user during or after installation. The instructions vary according to platform.
To create the Oracle Secure Backup user during installation of the Oracle Secure Backup software on Linux or UNIX, modify the obparameters
file when prompted by the installob
script. The script prompts you as follows:
Have you already reviewed and customized install/obparameters for your Oracle Secure Backup installation [yes]?
You can enter no
and then modify the obparameters
file, which is located in the install
subdirectory of the Oracle Secure Backup home. Change the value of the following parameter to yes
:
create pre-authorized oracle user: no
In the obparameters
file, you can specify the default operating system user and group or accept the defaults. For example, on Linux and UNIX the default user is oracle
and default group is dba
:
default UNIX user: oracle default UNIX group: dba
If you accept the default user and group names, then the installation program automatically creates an Oracle Secure Backup user named oracle
. The Linux or UNIX user named oracle
in the dba
group is granted preauthorized access to this Oracle Secure Backup account.
See Also:
Oracle Secure Backup Installation Guide to learn how to install Oracle Secure Backup on Linux and UNIXTo create the Oracle Secure Backup user on Windows, run the InstallShield wizard as described in Oracle Secure Backup Installation Guide. When you are prompted to choose a role for the host, you can select Create "oracle" user and remove the red X as shown in Figure 6-5.
Figure 6-5 Creating the oracle User During a Windows Installation
The installer automatically creates an Oracle Secure Backup user named oracle
and assigns it to the oracle
class. Example 6-1 shows sample lsuser
output for the oracle
user after an installation on Windows.
Example 6-1 Default oracle User
ob> lsuser --long oracle oracle: Password: (not set) User class: oracle Given name: [none] UNIX name: oracle UNIX group: dba Windows domain/acct: [all] Administrator NDMP server user: no Email address: [none] UUID: e95891fa-5a80-4500-8865-3706a7db74da Preauthorized access: Hostname: [all] Username: [all] Windows domain: [all] RMAN enabled: yes Cmdline enabled: no
By default, all Windows users on all Windows domains are preauthorized to make RMAN backups to the Oracle Secure Backup SBT interface.
The Oracle Secure Backup user named oracle
does not have the right to perform backups as a privileged user. To enable oracle
to make unprivileged backups, ensure that the Windows domain, user name, and password information is correct. By default the password is not set for the user listed in the Windows domain/acct
(see output in Example 6-1). You can run the chuser
command in obtool
to modify the Windows domain setting for the oracle
user, either specifying a new password for the currently specified Windows account or entering completely new information.
Example 6-2 specifies the password for the Administrator
user listed in the Windows domain/acct
shown in Example 6-1. Because no password is specified in --adddomain
, obtool
prompts for it.
Example 6-2 Setting the Windows Domain Password for the oracle User
ob> chuser oracle --adddomain *,Administrator Password: Password (again): ob>
See Also:
Oracle Secure Backup Installation Guide to learn how to install Oracle Secure Backup on Windows
Oracle Secure Backup Reference to learn about the chuser
command
To create the Oracle Secure Backup user after installation, use the Web tool as described in "Assigning Preauthorized Access". If you are using Enterprise Manager, then you can navigate to the Oracle Secure Backup Web tool by clicking File System Backup and Restore in the Maintenance page.
Alternatively, you can run the mkuser
command in obtool
to create the user. Example 6-3 uses mkuser
to create an Oracle Secure Backup user named oracle
and assign this user to the oracle
class. Example 6-3 uses the --preauth
option to grant RMAN SBT access to the Linux/UNIX user oracle
on host brhost2
.
A media family is a named classification of volumes that share common attributes. As explained in "Content-Managed Expiration Policies", the default media family for use by RMAN is named RMAN-DEFAULT
. Thus, creating media families for use in RMAN backups is optional.
Note:
You cannot delete or rename theRMAN-DEFAULT
media family, although you can modify certain attributes through the Web tool or obtool
(see "Editing or Displaying Media Family Attributes").You may find it useful to create different media families depending on the type of backup set: archived redo logs or datafiles. You can create media families in Enterprise Manager. Alternatively, you can use the Oracle Secure Web tool, as described in "Adding a Media Family", or use the mkmf
command in obtool
.
When you create a media family, you specify a volume expiration policy that determines when volumes in a media family are expired, that is, eligible to be overwritten and recycled. Volumes in a media family use either a content-managed expiration policy or time-managed expiration policy.
Media families that are content-managed (for example, RMAN-DEFAULT
) are for RMAN backups only. You can make also RMAN backups to time-managed volumes, which means that it is possible for these volumes to contain a mixture of file system backups and RMAN backup pieces.
Caution:
If you make RMAN backups to time-managed volumes, then it is possible for a volume to expire and be recycled while the RMAN repository reports the backup pieces as available. In this case, you must use theCROSSCHECK
command in RMAN to resolve the discrepancy.To create a content-managed media family in Enterprise Manager Database Control:
Log in to the Enterprise Manager Database Control as a user with database administrator rights.
Navigate to the Oracle Secure Backup section of the Maintenance page. Figure 3-6 shows the relevant section of the Maintenance page.
Click Oracle Secure Backup Device and Media.
The Administrative Server: hostname page appears.
In Media Families, click the adjacent number.
The Media Families page appears. The table should include a row for the system-supplied RMAN-DEFAULT
media family.
Click Add to create a new media family.
Configure your media family as follows:
In the Media Family Name box, enter the name for the media family. For example, enter datafile_mf
for a media family that applies to datafiles.
In the Write Window box, enter the amount of time during which a volume set can be appended. For example, enter 7 days
.
In the Retention Policy section, select Content Manages Reuse.
In the Comment box, you can optionally enter a description of the media family. For example, you can indicate that it is intended for backups of datafiles only.
Click OK.
You are returned to the Media Families page. The table should now contain the media family that you just created.
As explained in "Database Backup Storage Selectors", Oracle Secure Backup uses storage selectors to represent backup attributes that describe an Oracle database. You can use storage selectors to specify which resources should be used by Oracle Secure Backup SBT backups. The selectors act as a layer between RMAN, which accesses the database, and the Oracle Secure Backup software, which manages the backup media.
The following settings are required in database backup storage selectors:
The database name or ID
The name of the database host
The name of the media family to use for the RMAN backups
Optional settings of backup storage selectors include the following:
The content of the backup, for example, full or incremental backup
The copy number of duplexed backups
You can create multiple database backup storage selectors. For example, you could create one database storage selector for datafile backups of all databases in the domain, and another selector for archived log backups of all databases in the domain. You could specify one library destination for the datafile backups and a different library destination for the archived log backups.
You cannot create multiple storage selectors if the database name, database ID, host name, content type, and copy numbers all match. With the exception of a wildcard (*
), a more general setting matches a more specific setting. For example, if you create a storage selector with --dbname
set to db_1
and db_2
, then you cannot create another selector that has --dbname
set to db_1
only and has all other attributes identical to those in the first selector. If you create a storage selector that has --dbname
set to set to all (*
), however, then you can create another selector that has --dbname
set to db_1
and has all other attributes identical to those used for the first selector.
When an RMAN backup job is initiated through its SBT interface, Oracle Secure Backup examines the database backup storage selectors to determine whether a backup storage selector matches the attributes of the backup job. A match occurs when every attribute of a backup storage selector matches the corresponding attribute of the backup job. If multiple storage selectors match the job, then Oracle Secure Backup chooses the selector whose attributes are most specific. For example, a backup storage selector with the database name set to db_1
matches before a backup storage selector with the database name set to all (*
).
Note:
"Setting Media Management Parameters in RMAN" explains how media management parameters specified on RMAN channels can override settings in a backup storage selector.You can use Enterprise Manager to create database backup storage selectors. Note that Enterprise Manager gives the selector a system-defined name. Alternatively, you can use the Web tool as described in "Configuring Database Backup Storage Selectors" or use the mkssel
command in obtool
, in which case you can give the storage selector a user-defined name.
To create a database backup storage selector in Enterprise Manager Database Control:
Log in to the Enterprise Manager Database Control as a user with database administrator rights.
Navigate to the Backup/Recovery Settings section of the Maintenance page. This page is shown in Figure 3-6.
Click Backup Settings.
The Backup Settings page appears.
In the Device property page, scroll down to the Oracle Secure Backup section and click Configure.
The Administrative Server Login page appears.
In the Administrative Server list, select the administrative server. In this example, you are using the Database Console so the database host and administrative server are the same.
In the Username and Password boxes, enter operating system credentials for the administrative server. Optionally, check Save as Preferred Credential. Click OK.
The Backup Storage Selectors page appears.
Click Add.
The Add Backup Storage Selector page appears.
Optionally, make the following selections:
In the For These Types of Backups section, check the types of backups that should use this storage selector. You can also select the copy number; the default is an asterisk (*
), which means all copies.
In the Use Media Family section, select a media family for the selector. The media family defaults to RMAN-DEFAULT
.
In the Use Resource Wait Time section, specify how long to wait for the availability of resources required by backups. If resources do not become available within this time, then the backup fails. The default wait time is forever
, which means there is no limit.
In the Use Device section, click Add to restrict the backup to the specified devices.
The Use Devices page appears.
In the Search Results table, select the device to which to restrict the backup and click Select. Note that you can filter the devices that are displayed by first entering a search string in the Device Name box and clicking Go.
The Add Backup Storage Selector page is displayed.
In Use Devices, check the added device and then click OK.
The Backup Storage Selectors page appears. The table displays the backup storage selector that you created. Note that the selector has a system-generated name. You can edit the storage selector by selecting it and clicking Edit.
This section assumes that you are familiar with setting Recovery Manager media management parameters. For a general explanation of how to specify media management parameters in RMAN, refer to Oracle Database Backup and Recovery Advanced User's Guide.
You can specify media management parameters in RMAN by the following means:
Environment variables, which are specified with the ENV
parameter of the PARMS
option on the CONFIGURE
or ALLOCATE
CHANNEL
commands
You can use the following Oracle Secure Backup parameters in RMAN backup and restore jobs:
OB_MEDIA_FAMILY[_
n
]
Use this parameter to define which media can be used for backup jobs.
OB_DEVICE[_
n
]
Use this parameter to define which tape drives can be used for backups.
OB_RESOURCE_WAIT_TIME
Use this parameter to specify the duration for which a backup or restore job should wait for the required resources to become available.
In general, the preceding media management parameters override the settings of matching database backup storage selectors. Refer to Oracle Secure Backup Reference for an exhaustive chart that shows the relationship between RMAN media management parameters and database backup storage selectors.
To set media management parameters in an RMAN database backup:
Follow Step 1 through Step 6 in the section "Performing Backups with RMAN and Oracle Secure Backup".
Click Edit RMAN Script.
The Schedule Customized Backup: Review: Edit RMAN Script page appears.
In the main window, modify the script to use media management parameters. For example, assume the backup script is as follows:
backup device type sbt database include current controlfile; backup device type sbt archivelog all not backed up;
To configure the backup to use the my_mf
media family, you could modify the script as follows:
run { allocate channel c1 device type sbt parms 'ENV=(OB_MEDIA_FAMILY=my_mf)'; backup database include current controlfile; backup archivelog all not backed up; }
Click Submit Job.
The Status page appears.
See Also:
Oracle Secure Backup Reference to learn about the RMAN media management parameters and their relationship with database backup storage selectorsAfter you have configured RMAN to use the Oracle Secure Backup SBT interface, the procedure for making RMAN backups is the same as described in Oracle Database Backup and Recovery Basics. This section describes how to use Enterprise Manager to back up the whole database through the Oracle Secure Backup SBT.
To back up the database:
Log in to the Enterprise Manager Database Control as a user with database administrator rights.
In the Backup/Recovery section of the Maintenance page, click Schedule Backup. Figure 3-6 shows the relevant section of the Maintenance page.
In the Customized Backup section, select Whole Database and then click Schedule Customized Backup.
The Schedule Customized Backup: Options page appears.
Perform the following actions and then click Next:
In the Backup Type section, select Full Backup.
In the Backup Mode section, select Online Backup.
In the Advanced section, check Also back up all archived logs on disk.
The Schedule Customized Backup: Settings page appears.
Click Tape and click Next.
The Schedule Customized Backup: Schedule page appears.
Click Next and review your backup characteristics.
Click Submit Job.
The Status page appears.
Click View Job to monitor the progress of the backup.
The Execution: database_name page appears. Refresh the page until the Backup link appears.
Click Backup.
The Step: Backup page appears. Refresh this page to display the RMAN output for the backup job.
After you have configured RMAN to use the Oracle Secure Backup SBT interface, the procedure for restore database files is the same as described in Oracle Database Backup and Recovery Basics. This section describes how to use Enterprise Manager to restore a tablespace from tape and perform media recovery.
To restore and recover a tablespace:
Log in to the Enterprise Manager Database Control as a user with database administrator rights.
In the Storage section of the Administration page, click Tablespaces.
The Tablespaces page appears.
In the table describing the tablespaces, click EXAMPLE.
The View Tablespace: EXAMPLE page appears.
In the Actions list, select Take Offline and then click Go.
The Take Tablespace Offline page appears.
Select Immediate and click OK.
The View Tablespace: EXAMPLE page appears. The status bar should indicate that the tablespace is offline.
Use an operating system utility to delete the datafile for the example
tablespace from the operating system.
In Enterprise Manager, navigate to the Backup/Recovery section of the Maintenance page and select Perform Recovery.
The Information bar indicates that a tablespace and datafile are offline.
In the Object Level Recovery section, make the following selections and then click Perform Object Level Recovery:
In the Object Type list, select Tablespaces.
In the Operation Type section, select Recover to current time or a previous point-in-time.
The Perform Object Level Recovery: Point-in-time page appears.
Select EXAMPLE and click Next.
The Perform Object Level Recovery: Rename page appears.
Accept the default location and click Next.
The Perform Object Level Recovery: Review appears.
Review the recovery request and click Submit.
The Processing: Perform Object Level Recovery page appears. When RMAN completes the recovery, the Perform Recovery: Result page appears with the transcript of the job.
This section explains how to use Oracle Secure Backup to access and manage information about RMAN backups. This section contains the following topics:
Oracle Database Backup and Recovery Basics explains how to access metadata in the RMAN repository through RMAN commands, dynamic performance (V$
) views on the target database, and recovery catalog views. Although this metadata includes information about RMAN backups made to the Oracle Secure Backup SBT interface, the metadata is managed by RMAN.
Oracle Secure Backup maintains its own catalog of backup metadata; this backup catalog is located on the administrative server and is not managed by RMAN. You can use the Oracle Secure Backup Web tool to display catalog metadata about RMAN jobs and backup pieces. Alternatively, you can use the lsjob
, catxcr
, and lspiece
commands in obtool
.
You can make RMAN backups on volumes that use a content-managed expiration policy or time-managed expiration policy (see "Volume Expiration Policies"). In general, you should use the DELETE
command in RMAN to mark backup pieces on tape as deleted. In response, Oracle Secure Backup updates its catalog to indicate that the backup pieces are deleted, so both the RMAN repository and Oracle Secure Backup catalog show the pieces as deleted.
If you use the rmpiece
command in Oracle Secure Backup to delete backup pieces from tape, then the RMAN metadata will fail to reflect the tape contents. This discrepancy can also occur when RMAN backup pieces exist on volumes that are expired by time-managed policy, or when you forcibly overwrite a volume containing RMAN backup pieces. Use the CROSSCHECK
command in RMAN to resolve discrepancies between tape backups and the RMAN repository.
See Also:
Oracle Database Backup and Recovery Basics to learn about crosschecking backups
Oracle Database Backup and Recovery Basics to learn about deleting RMAN backups
RMAN backups made with the Oracle Secure Backup SBT interface are subject to all Oracle Secure Backup job management commands. "Managing Backup and Restore Jobs" explains how to manage file system and database backup and restore jobs.
When you use RMAN to backup or restore a database, the job contains the name of the database. Example 6-4 shows sample output for backup and restore jobs relating to a database named orcl
.
Example 6-4 Database Backup and Restore Jobs
ob> lsjob --all Job ID Sched time Contents State ---------------- ----------- ------------------------------ --------------------------------------- oracle/1 none database orcl (dbid=1091504057) completed successfully at 2005/08/11.11:29 oracle/1.1 none datafile backup completed successfully at 2005/08/11.11:29 oracle/2 none database orcl (dbid=1091504057) completed successfully at 2005/08/11.11:56 oracle/2.1 none datafile backup completed successfully at 2005/08/11.11:56 oracle/3 none database orcl (dbid=1091504057) completed successfully at 2005/08/11.11:57 oracle/3.1 none restore piece '06grqejs_1_1' completed successfully at 2005/08/11.11:57
Note:
If multiple RMAN sessions are running concurrently on a database, then the sessions are grouped in the same Oracle Secure Backup job.Job transcripts contain detailed information, low-level about RMAN jobs. "Displaying Job Transcripts" explains how to use the Web tool to display transcripts. Alternatively, you can use the catxcr
command in obtool
.
Example 6-5 shows part of the transcript for an archived log backup. This backup uses the RMAN-DEFAULT
media family.
Example 6-5 Transcript of an Archived Log Backup Job
ob> catxcr --head 22 sbt/6.1 2005/06/28.13:01:04 ______________________________________________________________________ 2005/06/28.13:01:04 2005/06/28.13:01:04 Transcript for job sbt/6.1 running on stadv07 2005/06/28.13:01:04 Volume label: Volume tag: ADE202 Volume ID: RMAN-DEFAULT-000002 Volume sequence: 1 Volume set owner: root Volume set created: Tue Jun 28 13:01:30 2005 Media family: RMAN-DEFAULT Volume set expires: never; content manages reuse Archive label: File number: 1 File section: 1 Owner: root Client host: stadv07 Backup level: 0 S/w compression: no Archive created: Tue Jun 28 13:01:30 2005
See Also:
Oracle Secure Backup Reference to learn about the job commandsIf an error occurs during an SBT session, then Oracle Secure Backup attempts to send the error description to the administrative server to be saved in the job transcript. The database writes SBT errors to the sbtio.log
trace file, unless the user has configured the file to be named otherwise. Typically, sbtio.log
is located in the rdbms/log
subdirectory of the Oracle home.
See Also:
Oracle Database Backup and Recovery Advanced User's Guide to learn how troubleshoot RMAN backup and restore operationsTypically, you use RMAN to access metadata about RMAN backup sets. You can also view RMAN backup piece information in Oracle Secure Backup.
As explained in "Backup Sets and Backup Images", an RMAN backup piece is represented in Oracle Secure Backup as a backup image. "Managing Backup Images" explains how to use the Web tool to display information about backup pieces recorded in the Oracle Secure Backup catalog. Alternatively, you can use lspiece
command. Example 6-6 shows sample output for lspiece
.
Example 6-6 Displaying Backup Pieces
ob> lspiece --long Backup piece OID: 104 Database: ob Database ID: 1566254457 Content: archivelog Copy number: 0 Created: 2005/06/28.13:01 Host: stadv07 Piece name: 05go3tgd_1_1 Backup piece OID: 105 Database: ob Database ID: 1566254457 Content: archivelog Copy number: 0 Created: 2005/06/28.13:02 Host: stadv07 Piece name: 06go3ti5_1_1
In some circumstances, a tape may contain information about RMAN backups when this information is not in the Oracle Secure Backup catalog. The situation could occur if a disk fails and you must restore files on the administrative server as described in "Restoring Critical Data on the Administrative Server".
To add metadata about RMAN backups to the Oracle Secure Backup catalog, you must use the obtar
command-line utility rather than the Web tool or obtool
. "Cataloging the Contents of a Backup Image" explains how to use the -tG
options in obtar
to recatalog the files.
You can use the Oracle Secure Backup SBT library in conjunction with RMAN to back up the database in an Oracle Real Application Clusters (RAC) system. If the Oracle Secure Backup software is installed on a cluster node, then RMAN can connect to the database instance on this node and then back up or restore data by means of the SBT library on this node.
It is recommended that you install Oracle Secure Backup on each node in the cluster. This practice enables RMAN to connect to any instance and initiate SBT operations. RMAN can restore a backup piece to any node within a cluster that has the Oracle Secure Backup software installed, regardless of which node created the backup piece.
The best practice is to configure each RAC node as a client host within the administrative domain. You can use Oracle Secure Backup to back up node-specific configuration data on the file system of each node. Note that Oracle Secure Backup handles file system backups of a RAC client no differently from any other client host. Figure 6-6 shows a sample administrative domain that includes a three-node RAC system, with each node configured as an Oracle Secure Backup client.
Figure 6-6 Using RMAN and Oracle Secure Backup in a Real Application Clusters Environment