3 Configuring Protected Databases

This chapter describes how to configure protected databases for backup and recovery operations with Recovery Appliance.

This chapter contains the following topics:

3.1 Overview of Configuring Protected Databases for Recovery Appliance

To use Recovery Appliance as a centralized repository for your protected database backups, configuration is required both on the Recovery Appliance and on the protected database. You can use Enterprise Manager Cloud Control (Cloud Control) or RMAN to configure protected databases.

On the Recovery Appliance, the configuration steps include creating a protection policy that is assigned to the protected database, creating a Recovery Appliance user who owns the virtual private catalog, and granting access for the protected databases to a Recovery Appliance user. These steps are described in Zero Data Loss Recovery Appliance Administrator's Guide.

On the protected database, the configuration includes enabling the protected database to access the Recovery Appliance, adding protected database metadata to the Recovery Appliance, and specifying settings that will be used during backup and recovery operations.

Note:

Oracle recommends that you use a server parameter file for your protected database.

Note:

Oracle wallets created by Cloud Control support HTTP transport only. To use HTTPS transport, the wallet needs to be set up outside of Cloud Control.

3.1.1 Steps to Configure Protected Databases for Recovery Appliance

Configuring protected databases performs the set up tasks required to back up and recover protected databases using Recovery Appliance.

To configure a protected database for Recovery Appliance:

  1. Enroll the protected database with a Recovery Appliance.

    Enrolling is a one-time task that must be performed the first time you set up a protected database to use the Recovery Appliance. It includes the tasks described in "Overview of Enrolling Protected Databases".

  2. Configure backup and recovery settings for the protected database.

    These settings, described in "Overview of Protected Database Backup Settings" and "Overview of Protected Database Recovery Settings", are used during backup and recovery operations for the protected database. The settings can be modified according to the backup or recovery task that is being performed.

  3. Perform a test backup to verify that your protected database configuration is successful.

3.1.2 Overview of Recovery Appliance Backup Module

The Recovery Appliance backup module is an Oracle-supplied SBT library that functions as a media management library. RMAN uses the Recovery Appliance backup module to transfer backup data over the network to the Recovery Appliance. The backup module is referenced when allocating or configuring an RMAN SBT channel for backup or recovery operations to the Recovery Appliance. All backups to the Recovery Appliance, and all restores of complete backup sets, are performed by means of this backup module.

3.1.2.1 Install Location for the Recovery Appliance Backup Module

The Recovery Appliance backup module must be installed in the following locations:

  • In the Oracle home of every protected database that uses RMAN to backup protected databases to Recovery Appliance

    If a particular Oracle home is used by more than one protected database, then the backup module must be installed only once in this Oracle home.

  • On every upstream Recovery Appliance that sends backups to downstream Recovery Appliances in replication environments

    The library for the Recovery Appliance backup module, libra.so, is preinstalled on Recovery Appliance. However, the Oracle wallet containing the replication user credentials must be created on the upstream Recovery Appliance.

3.1.2.2 Recovery Appliance Backup Module Configuration File

The Recovery Appliance backup module configuration file contains the configuration settings that are used when protected databases communicate with the Recovery Appliance. The configuration file is created automatically when the Recovery Appliance backup module is installed on the protected database host. "Configuration Parameters for the Recovery Appliance Backup Module" describes the configuration parameters that can be specified while installing the Recovery Appliance backup module.

You can also set some Recovery Appliance backup module configuration parameters inline, while configuring or allocating RMAN SBT channels for the Recovery Appliance, as shown in Example 3-3 and Example 3-4.

3.1.2.3 Configuration Parameters for the Recovery Appliance Backup Module

Table 3-1 describes the configuration parameters that are used when installing the Recovery Appliance backup module. These parameters are used by protected databases while backing up to and restoring from Recovery Appliance.

Table 3-1 Recovery Appliance Backup Module Installer Parameters

Parameter Name Mandatory/Optional Description

dbUser

Mandatory

User name of the Recovery Appliance user who has the privileges required to connect to, send, and receive backups for the protected database

dbPass

Mandatory

Password for the dbUser user

host

Mandatory

SCAN host name of the Recovery Appliance

port

Mandatory

Listener port number of the Recovery Appliance metadata database

serviceName

Mandatory

Service name of the Recovery Appliance metadata database

walletDir

Mandatory

Location of the Oracle wallet that stores the Recovery Appliance user credentials and the proxy information used to connect to the Recovery Appliance.

Note: If an Oracle wallet already exists in this directory, then the Recovery Appliance backup module installer overwrites the existing wallet.

proxyHost

Optional

Host name or IP address and TCP port of a proxy server through which to make an HTTP connection to the Recovery Appliance, in the form host:port.

configFile

Optional

Location of the configuration file that stores the configuration parameters for the Recovery Appliance backup module.

The default location on Linux/UNIX is $ORACLE_HOME/dbs/raORACLE_SID.ora. On Windows, the default location is $ORACLE_HOME\database\raORACLE_SID.ora.

libDir

Optional

Location where the shared library for the Recovery Appliance backup module is stored. This library is used to transfer backup data over the network to the Recovery Appliance.

It is recommended that you store the shared library in $ORACLE_HOME/lib on Linux/UNIX and in $ORACLE_HOME\database\lib on Windows.

When you omit this parameter, the installer does not download the shared library. Downloading the library is not required only when you regenerate the Oracle wallet and configuration file in an Oracle home where the backup module was previously installed.

libPlatform

Optional

Platform name of the protected database host on which the Recovery Appliance backup module needs to be installed.

Typically, the Recovery Appliance backup module installer automatically determines the platform on which it is run. You need to set this parameter only if the installer displays an error indicating the platform cannot be determined.

Valid values for platform name are: linux64, windows64, solaris_sparc64, solaris_sparcx64, zlinux64, aix_ppc64, and hpux_ia64.

argFile

Optional

File from which the remaining command-line parameters must be read during the Recovery Appliance backup module installation.

3.1.3 Overview of Enrolling Protected Databases

Enrolling a protected database enables a specific Recovery Appliance to receive backups from the protected database. This is a one-time task that must be performed the first time you set up a protected database to use Recovery Appliance. Enrolling requires steps to be performed on both the Recovery Appliance and the protected database.

Enrolling a protected database performs the following tasks:

  • Configures credentials required for the protected database to access the Recovery Appliance

    The protected database administrator requires credentials to authenticate with the Recovery Appliance and perform backup and recovery operations. This is done by associating a protected database administrator user with a Recovery Appliance user (in the Recovery Appliance metadata database). These credentials are stored in an Oracle wallet that is created on the protected database.

  • Defines recovery window goals and allocates reserved space on the Recovery Appliance by associating the protected database with an appropriate protection policy

  • Grants access to the protected database to the Recovery Appliance user

  • Registers the protected database with the Recovery Appliance catalog

    Metadata for protected database backups must be stored in the Recovery Appliance catalog. There are multiple virtual private catalogs within the Recovery Appliance catalog. You must specify the virtual private catalog owner that will manipulate metadata for this protected database.

  • When you use Cloud Control, an Enterprise Manager administrator must be provided access to the named credentials that are used to connect to a Recovery Appliance from Cloud Control. Enterprise Manager administrators that administer backup and restore operations for the protected database need access to these credentials in order to connect to the Recovery Appliance when configuring protected databases to backup to and restore from the Recovery Appliance.

3.1.4 Overview of Protected Database Backup Settings

Before you back up a protected database to Recovery Appliance, you must configure the protected database backup settings. These settings, described in Table 3-2, define the default behavior for your protected database backup environment. RMAN assigns default values for each backup setting. However, it is recommended that you configure settings according to the backup requirements of the protected database.

Table 3-2 Protected Database Backup Settings

Backup Setting Description

Control file autobackup

Specifies that the control file and server parameter file must be automatically backed up whenever a backup record is added or database structure metadata in the control file changes.

Disk backup location

When configuring backups for the Recovery Appliance, if backup polling is required, then specify the backup polling location.

Backup optimization

Skips the backup of files when an identical file has already been backed up to the Recovery Appliance.

Retention policy

Specifies which backups must be retained to meet your recovery goals. You can either specify a recovery window or a redundancy value.

This setting needs to be specified when you use a parallel backup strategy and need to delete obsolete backups created by your existing (not Recovery Appliance) backup strategy.

Archived redo log deletion policy

Specifies when archived redo logs are eligible for deletion. This policy applies to all archiving destinations including the fast recovery area.

3.1.5 Overview of Protected Database Recovery Settings

Table 3-3 describes the recovery settings for protected databases. The values of some settings (for example, fast recovery area), are assigned based on how the protected database is configured for the Recovery Appliance.

Table 3-3 Protected Database Recovery Settings

Recovery Setting Description

Desired mean time to recover

The Mean Time to Recover (MTTR) is the time required to recover the protected database. Plan your backup strategy based on an MTTR that is acceptable for your protected database.

ARCHIVELOG mode

The ARCHIVELOG mode enables archiving of filled groups of online redo log files immediately after a redo log switch occurs.

Optionally, configure the following additional properties for the protected database:

  • Log Archive File Name Format

    Specifies the default file name format for archived redo log files. Use a text string and variables to specify this value. Valid variables are described in Oracle Database Reference.

  • Archived Redo Log Destination

    To use the fast recovery area as the redo log destination, set the Archived Redo Log Destination to USE_DB_RECOVERY_FILE_DEST.

Note: Running the protected database in ARCHIVELOG mode is mandatory if you want to send redo data to the Recovery Appliance.

See Also: Oracle Database Administrator's Guide for information about configuring your database to run in ARCHIVELOG mode.

Fast recovery area

A fast recovery area is a disk location that stores backup-related files such as RMAN backups, archived redo log files, control file and online redo log file copies. The fast recovery area automates management of backup-related files and minimizes the need to manually manage disk space for backup-related files.

See Also: Oracle Database Backup and Recovery User's Guide for more information about configuring a fast recovery area.

3.2 Enrolling the Protected Database with Recovery Appliance (Cloud Control)

Enrolling protected databases with a Recovery Appliance using Cloud Control includes the following high-level steps:

  1. Create the Enterprise Manager administrator user who has the privileges required to back up and recover the protected database.

    See "Creating the Enterprise Manager Administrator to Manage Protected Database Operations".

  2. Enroll the protected database with a Recovery Appliance.

    See "Enrolling a Protected Database with Recovery Appliance Using Cloud Control".

3.2.1 Creating the Enterprise Manager Administrator to Manage Protected Database Operations

The Enterprise Manager administrator is an Enterprise Manager user that has the roles and privileges required to manage the data protection of one or more protected databases.

To create an Enterprise Manager administrator named protdb_admin:

  1. Log in to Cloud Control as an Enterprise Manager administrator who has the privileges to create other Enterprise Manager administrator accounts.

  2. From the Setup menu, select Security, and then select Administrators.

    The Administrators page is displayed.

  3. Click Create to display the Create Administrator: Properties page.

  4. Enter the credentials of the new Enterprise Manager administrator in the Name and Password fields. In this example, the name of the Enterprise Manager administrator is protdb_admin.

    In the Password Profile field, DEFAULT is selected. This value need not be modified. Providing information in the other fields on this page is optional.

  5. Click Next to display the Create Administrator protdb_admin: Roles page.

  6. Move the EM_USER role from the Available Roles list to the Selected Roles list and click Next.

    The Create Administrator protdb_admin: Target Privileges page is displayed.

  7. In the Target Privileges section, add privileges for all the protected databases that will be managed by the new Enterprise Manager administrator.

    To add privileges for a target protected database:

    1. Click Add to display the Search and Add: Targets dialog.

    2. Search for the protected database using the Target Name, Target Type, and On Host filters. Choose the protected database and click Select.

      The selected protected database is added to the list of targets in the Target Privileges section.

    3. Click the View icon for this target and select the following privileges:

      Recovery Appliance target: View privilege.

      Targets corresponding to the protected databases that will be managed by this Enterprise Manager administrator user: Full privilege.

      Targets corresponding to the hosts of each protected database that will be managed by this Enterprise Manager administrator: Full privilege.

    Repeat these steps for each protected database that will be managed by the new Enterprise Manager user.

  8. Click Next to display the Create Administrator protdb_admin: EM Resource Privileges page.

  9. Perform the following steps:

    • For the Job System privilege, click the Edit icon in the Manage Privilege Grants column. In the Resource Type Privileges section, select Create and then click Continue.

    • To provide the EM administrator user access to existing credentials, click the Edit icon in the Named Credential column. In the Resource Privileges section, click Add and select the named credentials that must be associated with this Enterprise Manager administrator.

  10. Click Review to display the Create Administrator protdb_admin: Review page.

    The properties, roles, and privileges for this new user are displayed. Review the settings and click Back to modify settings.

  11. Click Finish to create the Enterprise Manager administrator.

3.2.2 Enrolling a Protected Database with Recovery Appliance Using Cloud Control

Cloud Control simplifies the process of enrolling protected databases by performing certain tasks automatically.

Note:

The Recovery Appliance Settings section that is used to register the protected databases is displayed only for protected databases using Oracle Database 11g Release 2 (11.2) or later. If the protected database release is lower than 11.2, then use the command line to register the protected database and configure virtual private catalog user credentials.

To enroll a protected database with a Recovery Appliance:

  1. Add the protected database to the Recovery Appliance.

    This step must be performed by the Recovery Appliance administrator and is described in Zero Data Loss Recovery Appliance Administrator's Guide.

    When adding a protected database, the Recovery Appliance administrator defines the following: protection policy associated with the protected database, minimum amount of disk space reserved for the protected database on the Recovery Appliance, and the Recovery Appliance user who has the privileges required to back up the protected database.

  2. Access the home page of the protected database as described in "Accessing the Protected Database Home Page Using Cloud Control".
  3. From the Availability menu, select Backup & Recovery, and then Backup Settings.

    The Backup Settings page is displayed.

  4. In the Recovery Appliance Settings section, specify the following settings:
    • Recovery Appliance: Select the name of the Recovery Appliance with which the protected database is being enrolled. Protected database backups will be stored on this Recovery Appliance.

    • Virtual Private Catalog User: Select the virtual private catalog user (Recovery Appliance user) on the Recovery Appliance that has the privileges required to send backups for this protected database. This user must have already been created by the Recovery Appliance administrator as described in Zero Data Loss Recovery Appliance Administrator's Guide.

      Note:

      You can asynchronously transport the protected database redo data directly to the Recovery Appliance by selecting Enable Real-Time Redo Transport. However, you can also enable real-time redo transport while configuring recovery settings for protected databases as described in "Configuring Recovery Settings for Protected Databases Using Cloud Control".

  5. Click Apply to save the settings.

After the protected database is enrolled with a Recovery Appliance, you can use the home page for the protected database (shown in Figure 3-1) to perform configuration, backup, and recovery operations for the protected database.

3.2.3 Accessing the Protected Database Home Page Using Cloud Control

The home page of a protected database in Cloud Control provides a centralized interface to manage configuration, backup, and recovery tasks for the protected database.

To access the protected database home page:

  1. Open the Cloud Control interface for Recovery Appliance and log in as the Enterprise Manager administrator of your protected database.
  2. From the Targets menu, select Databases.

    The Databases page is displayed. All the protected databases for which you have privileges are listed.

  3. In the Name column, click the name of the protected database for which you want to perform backup and recovery operations.

    The home page for the selected protected database is displayed as shown in Figure 3-1. Use the menu options on this page to perform configuration, backup, and recovery tasks for the protected database.

    Figure 3-1 Protected Database Home Page

    Description of Figure 3-1 follows
    Description of "Figure 3-1 Protected Database Home Page"

3.3 Enrolling the Protected Database with Recovery Appliance (Command Line)

The enrollment steps on the Recovery Appliance are performed using procedures in the DBMS_RA package. The steps performed on the protected databases use RMAN or operating system commands.

To enroll a protected database with a Recovery Appliance using RMAN:

  1. Install the Recovery Appliance backup module.

    This creates the Oracle wallet that stores the credentials required to access the Recovery Appliance and installs the shared library that transfers backup data to the Recovery Appliance.

    Note:

    Oracle 10g protected databases require alternate manual steps for installing the library and creating the wallet. See "Enrolling Oracle 10g Protected Databases" for instructions on how to complete these tasks.

  2. Add the protected database to the Recovery Appliance.

    The Recovery Appliance administrator, who has SYS privileges on the Recovery Appliance metadata database, is responsible for adding protected databases. You must provide the following information to enable the Recovery Appliance administrator to decide which protection policy must be assigned to the protected database:

    • recovery window goal for the protected database

    • estimated space required to store backups for this protected database

  3. Grant the privileges required for performing backup and recovery operations to the Recovery Appliance user that the protected database will use for authentication. This Recovery Appliance user owns the virtual private catalog that stores metadata for the protected database.
  4. Register the protected database with the Recovery Appliance catalog.
  5. After the registration process is complete, execute a test backup to ensure that the configuration is correct.

3.3.1 Installing the Recovery Appliance Backup Module

Protected databases communicate with the Recovery Appliance through the Recovery Appliance backup module. You must install the backup module on the protected database host before you enroll the protected database with Recovery Appliance. "Overview of Recovery Appliance Backup Module" describes the location where the Recovery Appliance backup module must be installed.

During the Recovery Appliance backup module installation, an Oracle wallet that contains credentials required to authenticate the protected database with Recovery Appliance is created. Additional Oracle wallets can be created as described in "Creating an Oracle Wallet on the Protected Database".

Note:

Oracle 10g protected databases require alternate manual steps for installing the library and creating the wallet. See "Enrolling Oracle 10g Protected Databases" for instructions on how to complete these tasks.

To install the Recovery Appliance backup module:

  1. Complete the preparation tasks described in "Preparing to Install the Recovery Appliance Backup Module".
  2. Download the Recovery Appliance backup module installer as described in "Obtaining the Installer for the Recovery Appliance Backup Module".
  3. In each Oracle home that contains one or more protected databases, install the Recovery Appliance backup module as described in "Running the Recovery Appliance Backup Module Installer".

3.3.1.1 Preparing to Install the Recovery Appliance Backup Module

Complete the following steps before you install the Recovery Appliance backup module:

  • Verify that you have Java version 1.5 or higher

  • Contact the Recovery Appliance administrator and obtain the following information:

    • Recovery Appliance host name and port number

    • Credentials of the Recovery Appliance user that will be used to authenticate the protected database with the Recovery Appliance

      The permissions required to perform protected database backup and recovery operations need to be assigned to this Recovery Appliance user.

  • Ensure that the release of the protected database is Oracle Database 10g Release 2 or later.

3.3.1.2 Obtaining the Installer for the Recovery Appliance Backup Module

You can either download the Recovery Appliance backup module installer from the Oracle Technology Network (OTN) or obtain it from the Recovery Appliance.

On the Recovery Appliance, the installer is called ra_installer.zip and is available in the ORACLE_HOME/lib directory. During the installation, the Recovery Appliance backup module first attempts to download the modules required for your platform from OTN. If OTN access is unavailable, then the installer obtains the required libraries from the Recovery Appliance.

To download the Recovery Appliance backup module installer from OTN:

  1. Access the following URL on OTN:
  2. Sign in using your OTN account credentials.
  3. Select Accept License Agreement to accept the OTN license agreement.
  4. Click All Supported Platforms to download the Recovery Appliance backup module for your platform.

    The Recovery Appliance installer is named ra_installer.zip.

3.3.1.3 Running the Recovery Appliance Backup Module Installer

Install the Recovery Appliance backup module in the host file system of the protected database. Since the Recovery Appliance backup module is a shared library, it must be installed into a location within the shared library search path that is visible to every protected database instance. For example, $ORACLE_HOME/lib is the default location for shared libraries for the Oracle database.

The Recovery Appliance backup module location is used with the SBT_LIBRARY parameter in the ALLOCATE CHANNEL or CONFIGURE CHANNEL commands as described in "Using RMAN Channels for Recovery Appliance Backup and Recovery Operations".

To run the Recovery Appliance backup module installer:

  1. Unzip the installer downloaded in "Obtaining the Installer for the Recovery Appliance Backup Module" into a local directory.

    The installer contains the following files: ra_install.jar and ra_readme.txt.

  2. Ensure that the ORACLE_HOME environment variable is set to the Oracle home of the protected database.
  3. Run the installer ra_install.jar by providing the mandatory parameters. Table 3-1 describes the parameters required to install the Recovery Appliance backup module.

    For example, the following command runs the Recovery Appliance installer with the VPC user name rauser11 and password rau11pswd. The Oracle wallet containing the Recovery Appliance credentials is stored in $ORACLE_HOME/dbs/ra_wallet and the SBT library for the Recovery Appliance backup module is stored in $ORACLE_HOME/lib. The Single Client Access Name (SCAN) of the Recovery Appliance is ra-scan, the listener port number of the Recovery Appliance metadata database is 1521, and the service name of the Recovery Appliance metadata database is myzdlra.

    % java -jar ra_install.jar -dbUser rauser11 -dbPass rau11pswd -host ra-scan -port 1521 
    -serviceName myzdlra -walletDir $ORACLE_HOME/dba/ra_wallet -libDir $ORACLE_HOME/lib 
    -proxyHost www-proxy.mycompany.com
    

    See Also:

    "Creating an Oracle Wallet on the Protected Database" for to steps to manually create an Oracle wallet

3.3.2 Enrolling Oracle 10g Protected Databases

Oracle 10g protected database enrollment requires alternate manual configuration steps for the first part of the enrollment process.

Perform the following tasks on the protected database server:

  1. Add a connect descriptor for the Recovery Appliance to the tnsnames.ora file.

    This descriptor is required because Oracle 10g does not support the Easy Connect naming method.

    The following example shows how an entry for Recovery Appliance should appear in the file:

    ZDLRA9=
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = scaz15ingest-scan1)(PORT = 1521))
        (CONNECT_DATA = 
          (SERVER = DEDICATED)
          (SERVICE_NAME = zdlra9) 
        )
      )
    
  2. Create a directory for an Oracle wallet in the $ORACLE_HOME/dbs directory.
  3. Create a wallet in the subdirectory you created in the previous step.

    The following example creates a wallet in a subdirectory named ra_wallet:

    $ /u01/app/oracle/product/10.2.0/db_1/bin/mkstore -wrl
      /u01/app/oracle/product/10.2.0/db_1/dbs/ra_wallet/ -create
    
  4. Add the credentials for the Recovery Appliance user (virtual private catalog user) to the wallet.

    The following example creates a credential with the user name rauser10 and the password welcome1 for the zdlra9 Recovery Appliance:

    $ /u01/app/oracle/product/10.2.0/db_1/bin/mkstore -wrl
      /u01/app/oracle/product/10.2.0/db_1/dbs/ra_wallet/ -createCredential "zdlra9" "rauser10" "welcome1"
    
  5. Ensure that the sqlnet.ora file contains the location of the Oracle wallet.

    The following example shows how the entry should appear:

    $ cat /u01/app/oracle/product/10.2.0/db_1/network/admin/sqlnet.ora
    # sqlnet.ora Network Configuration File:
    /u01/app/oracle/product/10.2.0/db_1/network/admin/sqlnet.ora
    # Generated by Oracle configuration tools.
    NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
    SQLNET.WALLET_OVERRIDE = true
    WALLET_LOCATION = 
    (SOURCE = 
        (METHOD = FILE)
        (METHOD_DATA =
          (DIRECTORY = /u01/app/oracle/product/10.2.0/db_1/dbs/ra_wallet)
       )
      )
    
  6. Copy the libra.so file from the ORACLE_HOME/lib directory of the Recovery Appliance to the ORACLE_HOME/lib directory of the protected database.

3.3.3 Registering a Protected Database with the Recovery Appliance Catalog

All protected databases must use the Recovery Appliance catalog on the target Recovery Appliance to store protected database backup metadata. Registering the protected database with the Recovery Appliance catalog ensures that metadata for the protected database and its backups is stored in the Recovery Appliance catalog. However, any existing backup metadata stored in an RMAN recovery catalog is not available in the Recovery Appliance catalog unless you import the RMAN recovery catalog into the Recovery Appliance catalog as described in "Importing Protected Database Metadata into the Recovery Appliance Catalog".

Use the REGISTER DATABASE command to register protected databases with the Recovery Appliance.

To register a protected database with the Recovery Appliance:

  1. Obtain the name and password of the Recovery Appliance catalog owner that will store backup metadata for this protected database. Contact the Recovery Appliance administrator for these credentials.
  2. Connect to the protected database as TARGET and to the Recovery Appliance catalog as CATALOG.
  3. Register the protected database using the REGISTER DATABASE command.

    The following command registers the protected database with the Recovery Appliance:

    REGISTER DATABASE;
    
    database registered in recovery catalog
    starting full resync of recover catalog
    full resync complete
    

See Also:

3.4 Configuring Backup and Recovery Settings for Protected Databases (Cloud Control)

Before you back up a protected database to the Recovery Appliance, you must configure backup and recovery settings for the protected database. These configured settings are used in subsequent backup and recovery operations.

Note:

You can use Cloud Control to enroll protected databases with Oracle Database 11g Release 2 (11.2) or later. For Oracle Database releases earlier than 11.2, use the command line to configure backup and recovery settings.

3.4.1 Configuring Backup Settings for Protected Databases Using Cloud Control

Backup settings define the default backup environment for the protected database. The settings that configure real-time redo transport and polling locations define how backups are created to the Recovery Appliance. Other settings, such as control file autobackups or backup optimization, define best practices and performance improvements for protected database backups. These settings may be configured based on your requirements.

To configure backup settings for a protected database using Cloud Control:

  1. Access the home page for the protected database as described in "Accessing the Protected Database Home Page Using Cloud Control".
  2. From the Availability menu, select Backup & Recovery, and then select Backup Settings.

    The Backup Settings page for the protected database is displayed. Figure 3-2 displays the Device tab of the Backup Settings page. The Recovery Appliance Settings section displays the Recovery Appliance and the Recovery Appliance user that you configured in "Enrolling a Protected Database with Recovery Appliance Using Cloud Control".

    Figure 3-2 Backup Settings Page for Protected Databases

    Description of Figure 3-2 follows
    Description of "Figure 3-2 Backup Settings Page for Protected Databases"
  3. In the Device tab, configure the following optional settings:
    • To write redo data asynchronously from the protected database to the Recovery Appliance, in the Recovery Appliance Settings section, select Enable Real-Time Redo Transport.

    • If you want to configure backup polling for the protected database, then specify the polling location in the Disk Backup Location setting of the Disk Settings section.

      Disk backups created to this location will then be automatically picked up by the Recovery Appliance if the protected database is assigned to a protection policy that specifies this location as a polling location. Polling policies are created by the Recovery Appliance administrator.

  4. In the Policy tab, configure settings that define the objects that must be backed up.

    Although it is not mandatory to configure the settings in this section, it is strongly recommended that you configure automatic backups for the control file and server parameter file. Table 3-2 describes these configuration settings.

    • To configure control file and server parameter file autobackups:

      • Select Automatically backup the control file and server parameter file (SPFILE) with every backup and database structural change.

      • In the Autobackup Disk Location field, specify an existing directory or Automatic Storage Management (ASM) disk group name to which the control file and server parameter file autobackups must be stored. If no location is specified, then the autobackups are stored in the local fast recovery area.

    • To enable backup optimization, select Optimize the whole database backup by skipping unchanged files such as read-only and offline datafiles that have been backed up.

    • To enable block change tracking, select Enable block change tracking for faster incremental backups and specify the name of the block change tracking file in the Block Change Tracking File field.

    • In the Tablespaces Excluded from Whole Database Backup section, ensure that you do not add any tablespaces.

      Note:

      When backing up to Recovery Appliance, the initial full backup of the protected database must contain all the tablespaces.

    • In the Archived Redo Log Deletion Policy section, select one of the following options to specify how RMAN must handle redo log file deletion for the local backups stored on the protected database host:

      • None

        Archived redo logs in the fast recovery area are eligible for deletion if they have been backed up at least once or if they are obsolete according to the backup retention policy.

      • Delete archived redo log files after they have been backed up the specified number of times

        Deletes archived redo log files that have been backed up the number of times specified in the Backups field.

    Note:

    In the Retention Policy section, you need not specify any values. The settings in the Retention Policy section are not used for backups to Recovery Appliance, as the retention policy is inherited from the protection policy that is associated with the protected database when it is enrolled with the Recovery Appliance.

  5. Click Apply to save the backup settings.

3.4.2 Configuring Recovery Settings for Protected Databases Using Cloud Control

Recovery settings define the default recovery environment for the protected database. The only mandatory setting for Recovery Appliance is the Log Archive Filename Format. Configuring the remaining recovery settings is optional.

To configure recovery settings for a protected database using Cloud Control:

  1. Access the home page for the protected database as described in "Accessing the Protected Database Home Page Using Cloud Control".
  2. From the Availability menu, select Backup & Recovery, then select Recovery Settings.

    The Recovery Settings page for the protected database is displayed as shown in Figure 3-3.

    Figure 3-3 Protected Database Recovery Settings

    Description of Figure 3-3 follows
    Description of "Figure 3-3 Protected Database Recovery Settings"
  3. In the Instance Recovery section, specify the Desired Mean Time To Recover. Refer to Table 3-3 for a brief description of the recovery settings.
  4. In the Media Recovery section, perform the following steps:
    • (Optional) Select ARCHIVELOG Mode.

    • (Optional) In the Log Archive Filename Format field, specify the format used for archived redo log file names.

    • In the Archived Redo Log Destination field, provide a destination to store archived redo log files or specify USE_DB_RECOVERY_FILE_DEST to indicate that the redo log files must be stored in the local fast recovery area.

      If you selected Enable Real-Time Redo Transport in the Backup settings for this protected database, then the archived redo log destination is automatically set.

  5. Configure a local fast recovery area for the protected database by specifying the following in the Fast Recovery section:
    • In the Fast Recovery Area Location field, specify the file-system or ASM location where backup-related files are stored. Oracle recommends that you configure a fast recovery area for the protected database. Local backups of the protected database are stored in the fast recovery area.

    • In the Fast Recovery Area Size field, specify the disk space quota allocated to the fast recovery area. This is the maximum storage that can be used by the recovery area for this protected database. Specifying a size is mandatory when you configure a fast recovery area.

  6. Click Apply to save the recovery settings.

3.4.3 Clearing the Backup Configuration of Protected Databases Using Cloud Control

You can clear the backup configuration of a protected database and remove its existing Recovery Appliance settings. Clearing the backup configuration removes the currently-configured Recovery Appliance and virtual private catalog user, any configured RMAN channels, and the real-time redo transport configuration.

To clear the backup configuration for a protected database using Cloud Control:

  1. Access the home page for the protected database as described in "Accessing the Protected Database Home Page Using Cloud Control".
  2. From the Availability menu, select Backup & Recovery, and then select Backup Settings.

    The Backup Settings page for the protected database is displayed as shown in Figure 3-2.

  3. In the Recovery Appliance Settings section, click Clear Configuration.

    Note:

    If real-time redo transport was configured for the protected database, then you must manually force a redo log switch to maintain an accurate state for the Redo Shipping column of this protected database in Cloud Control.

3.5 Configuring Backup and Recovery Settings for Protected Databases (Command Line)

You can use the regular RMAN commands to configure backup and recovery settings for protected databases. These configured settings are used in subsequent backup and recovery operations.

This section contains the following topics:

3.5.1 Configuring Backup Settings for Protected Databases Using the Command Line

RMAN assigns default values for protected database backup settings. You can use the CONFIGURE command to modify these settings according to the backup requirements of your protected database.

To configure backup settings for a protected database using the command line:

  1. Use RMAN to connect to the protected database as TARGET.

    The following command starts RMAN and connects to the protected database as target using operating system authentication:

    % rman target /
    
  2. Use the CONFIGURE command to configure the required backup settings.

    The backup settings that you can configure are:

    See Also:

    Oracle Database Backup and Recovery User's Guide for information about configuring backup optimization

  3. (Optional) To set up redo transport services for the protected database, configure real-time redo transport as described in "Configuring Real-Time Redo Transport".

3.5.1.1 Configuring Real-Time Redo Transport

When you configure real-time redo transport, redo data from the protected database is directly transported and stored on the Recovery Appliance. This reduces the window of potential data loss that exists between successive archived log backups as described in "About Configuring Real-Time Redo Transport for Protected Databases".

Configuring real-time redo transport for a protected database is a one-time step. After you set it up, the protected database asynchronously transports redo data to the Recovery Appliance.

Note:

  • The user you use for redo transport must be the same user you configured to send backups to the Recovery Appliance.

  • When you clear the real-time redo transport configuration for a protected database, you must manually force a redo log switch to maintain an accurate state for the protected database. The log switch forces the remote file server process (RFS) to stop sending redo data to Recovery Appliance.

See Also:

To enable real-time redo transport for a protected database:

  1. Ensure that the Recovery Appliance user that the protected database uses to send backups to the Recovery Appliance is configured. This same user will be used for redo transport.

    Also ensure that an Oracle wallet is created on the protected database that contains credentials for the Recovery Appliance (and redo transport) user. This process is described in "Creating an Oracle Wallet on the Protected Database".

    See Also:

    Zero Data Loss Recovery Appliance Administrator's Guide for information about creating the virtual private catalog account that is used by the Recovery Appliance user

  2. Ensure that the following conditions are met for the protected database:
    • ARCHIVELOG mode is enabled

    • DB_UNIQUE_NAME parameter is set

  3. Ensure that the REMOTE_LOGIN_PASSWORDFILE and LOG_ARCHIVE_FORMAT initialization parameters are set for the protected database:
    REMOTE_LOGIN_PASSWORDFILE=exclusive
    LOG_ARCHIVE_FORMAT='log_%d_%t_%s_%r.arc'
    

    REMOTE_LOGIN_PASSWORDFILE can be set to exclusive or shared.

  4. Start SQL*Plus and connect to the protected database as a user with the SYSDBA or SYSBACKUP privilege.

    The following command uses operating system authentication to connect to the protected database using SYSDBA privileges:

    % sqlplus / as sysdba
    
  5. (Only on Oracle RAC) Set the LOG_ARCHIVE_CONFIG initialization parameter to include a DG_CONFIG list. Also set the DB_UNIQUE_NAME for the protected database.

    The following SQL commands, when connected to the protected database as a user with SYSDBA privilege, set the DB_UNIQUE_NAME and LOG_ARCHIVE_CONFIG parameters for a protected database whose db_unique_name is hr_ptdb and db_name is hr_ptdb:

    ALTER SYSTEM SET DB_UNIQUE_NAME=hr_ptdb SCOPE=BOTH;
    ALTER SYSTEM SET LOG_ARCHIVE_CONFIG='DG_CONFIG=(zdlra2,hr_ptdb)' SCOPE=BOTH;
    

    The DB_NAME and the DB_UNIQUE_NAME of the Recovery Appliance database is zdlra2.

    See Also:

    Oracle Data Guard Concepts and Administration for information about setting a DG_CONFIG list

  6. Configure an archived log destination that points to the redo staging area on the Recovery Appliance.

    You configure an archived log destination by setting one of the LOG_ARCHIVE_DEST_n parameters, where n is any number between 1 and 31. You must include the SERVICE attribute to specify where to store the redo data. Set this attribute to the net service name of the Recovery Appliance database that stores the redo stream from the protected database.

    The following example configures the protected database to transport redo data asynchronously to a Recovery Appliance whose net service name is boston.

    ALTER SYSTEM SET LOG_ARCHIVE_DEST_3='SERVICE=boston 
    VALID_FOR=(ALL_LOGFILES, ALL_ROLES) ASYNC DB_UNIQUE_NAME=zdlra2' SCOPE=BOTH;
    

    See Also:

    Oracle Database Reference for information about setting the LOG_ARCHIVE_DEST_n parameter

  7. Enable logging for the archived redo log destination configured in Step 6 by setting the LOG_ARCHIVE_DEST_STATE_n parameter, where n matches the value used for the LOG_ARCHIVE_DEST_n parameter specified in Step 6.

    The following command enables archived redo logging for the destination set using the LOG_ARCHIVE_DEST_3 parameter:

    ALTER SYSTEM SET LOG_ARCHIVE_DEST_STATE_3='ENABLE' SCOPE=BOTH;
    

    See Also:

    Oracle Database Reference for information about setting the LOG_ARCHIVE_DEST_STATE_n parameter

  8. Set the redo transport user to the Recovery Appliance user that was created for this protected database (see Step 1).

    The following example sets the redo transport user to ravpc1:

    ALTER SYSTEM SET REDO_TRANSPORT_USER=ravpc1 SCOPE=BOTH;
    
  9. Shut down the protected database and restart it.
    SHUTDOWN IMMEDIATE;
    STARTUP;
    

    If the protected database uses a parameter file instead of a server parameter file, then add the parameters that were set in Steps 5 to 8 to the parameter file before you start up the protected database.

3.5.1.2 Creating an Oracle Wallet on the Protected Database

An Oracle wallet stores the credentials of the Recovery Appliance user that will be used by the protected database to authenticate with the Recovery Appliance. These same credentials are used for sending backups and redo, if configured. When you install the Recovery Appliance backup module, an Oracle wallet is automatically created. You can also create the wallet and add required entries manually.

Note:

The sqlnet.ora file in the protected database must contain the location of the Oracle wallet. Typically, the wallet location is automatically added to this file when you install the Recovery Appliance backup module.

Example 3-1 Creating an Oracle Wallet on the Protected Database

The following command creates an Oracle wallet that stores the credentials of the Recovery Appliance user named ravpc1:

$ mkstore                         \
  -wrl $ORACLE_HOME/oracle/wallet \
  -createALO                      \
  -createCredential newyork ravpc1

Enter the password for the ravpc1 user when prompted. Here, newyork is the net service name of the Recovery Appliance database. The directory $ORACLE_HOME/oracle/wallet must be created before the mkstore command is run.

Example 3-2 Creating an Oracle Wallet with Multiple User Credentials

The following command creates two sets of credentials in the Oracle wallet of a protected database. In this scenario, ra_user is used both by the Recovery Appliance for normal backup and recovery operations (and real-time redo transport, if enabled) and by the Data Guard standby database for data synchronization. The service name of the Recovery Appliance is zdlra2 and that of the primary database in the Data Guard set up is chicago.

$ mkstore                                             \
  -wrl $ORACLE_HOME/oracle/wallet                     \
  -createALO                                          \
  -createCredential chicago ra_user                 \
  -createCredential zdlra2 ra_user        

Enter the password for ra_user when prompted. The directory $ORACLE_HOME/oracle/wallet must be created before the mkstore command is run.

3.5.2 Configuring Recovery Settings for Protected Databases Using the Command Line

Use the CONFIGURE command to modify the default values assigned by RMAN for the protected database recovery settings.

To configure recovery settings for a protected database using the command line:

  1. Use RMAN to connect to the protected database as TARGET.

    The following command starts RMAN and connects to the protected database as target using operating system authentication:

    % rman target /
    
  2. Use the CONFIGURE command to configure the required recovery settings.

3.5.3 Using RMAN Channels for Recovery Appliance Backup and Recovery Operations

To transfer backups to and from the Recovery Appliance, you must use an RMAN SBT (System Backup to Tape) channel that corresponds to the Recovery Appliance backup module.

The following techniques are available to use RMAN channels for protected database operations:

3.5.3.1 Configuring RMAN SBT Channels for Recovery Appliance

You configure RMAN SBT channels for Recovery Appliance using the RMAN CONFIGURE command. Configuring channels for a protected database creates persistent settings that are applicable to all backup, restore, and maintenance operations on that protected database. Configured settings remain in effect until they are explicitly cleared, changed, or overridden in a particular operation using an ALLOCATE command.

Example 3-3 configures an RMAN SBT channel for a Recovery Appliance. After this configuration, you need not explicitly allocate SBT channels that correspond to the Recovery Appliance backup module for each backup or recovery operation.

Example 3-3 Configuring an RMAN Channel for Recovery Appliance

In this example, an RMAN SBT channel is configured with the SBT_LIBRARY parameter pointing to the Recovery Appliance backup module. The complete path of the shared library libra.so is specified. The RA_WALLET parameter represents the location of the Oracle wallet that stores the credentials used to authenticate this protected database with the Recovery Appliance. ra-scan is the SCAN of the Recovery Appliance and zdlra5 is the service name of the Recovery Appliance metadata database.

CONFIGURE CHANNEL DEVICE TYPE 'SBT_TAPE' 
PARMS 'SBT_LIBRARY=/u01/app/oracle/product/11.2.0.4.0/dbhome_1/lib/libra.so,
ENV=(RA_WALLET=location=file:/u01/app/oracle/product/11.2.0.4.0/dbhome_1/dbs/zdlra 
credential_alias=ra-scan:1521/zdlra5:dedicated)' FORMAT '%U_%d';

3.5.3.2 Allocating RMAN SBT Channels for Recovery Appliance

Use the RMAN ALLOCATE command to allocate RMAN SBT channels that will be used to back up to or recover from the Recovery Appliance. For a particular operation, you can override the persistent configuration that was set using the CONFIGURE command by explicitly allocating an RMAN SBT channel before the operation. Enclose the ALLOCATE command and the other commands in a RUN block.

Example 3-4 allocates an RMAN SBT channel for the Recovery Appliance and then creates a full backup of the protected database including archived redo logs.

Example 3-4 Allocating RMAN Channels for Recovery Appliance

This example allocates an RMAN SBT channel with the SBT_LIBRARY parameter specifying the complete path of the Recovery Appliance backup module. The ENV setting is used to specify the configuration parameters used by the Recovery Appliance backup module. ra-scan is the SCAN of the Recovery Appliance and zdlra5 is the service name of the Recovery Appliance metadata database.

RUN
{
ALLOCATE CHANNEL c1 DEVICE TYPE sbt_tape 
PARMS='SBT_LIBRARY=/u01/app/oracle/product/12.1.0.2/dbhome_1/lib/libra.so,
ENV=(RA_WALLET=location=file:/u01/app/oracle/product/12.1.0.2/dbhome_1/dbs 
credential_alias=ra-scan:1521/zdlra5:dedicated)' FORMAT '%U_%d';
BACKUP INCREMENTAL LEVEL 1 DATABASE PLUS ARCHIVELOG;
}

3.6 Performing Test Backup and Recovery Operations

After you enroll the protected database with a Recovery Appliance, it is recommended that you perform a test backup and recovery operation. This testing helps confirm that your configuration settings are accurate and that the backup to and recovery from the Recovery Appliance are performed successfully. If you encounter any problem with the test backup or recovery, you may correct your settings and reconfigure your protected database.

3.6.1 Running a Test Backup Using the Command Line

After configuring a protected database for Recovery Appliance, you can test the connection to the Recovery Appliance by attempting a test backup.

To create a test backup of the protected database:

  1. Connect to the protected database as TARGET and to the Recovery Appliance catalog as CATALOG.
  2. Configure an RMAN SBT channel for the Recovery Appliance as described in "Configuring RMAN SBT Channels for Recovery Appliance".

    A good guideline for choosing the number of channels is to start with the number of channels that are currently used for incremental backups or a default of 2 or 4 channels per node depending on the number of cores or CPUs.

  3. Use the following RMAN command to perform a full backup:
    BACKUP DEVICE TYPE SBT CUMULATIVE INCREMENTAL LEVEL 1 DATABASE
        PLUS ARCHIVELOG FORMAT %d_%U;
    

    This BACKUP command creates a new level 0 backup, if one does not already exist, when it is run for the first time.

    Note:

    Archive redo logs can be included with regular backups because the Recovery Appliance keeps track of which logs may need to be backed up and avoids backing up the same archived redo logs twice. The benefit of including archived redo logs is in the case where there is a gap. Without archived redo logs, gap detection may be delayed.

3.6.2 Running a Test Recovery Using the Command Line

After creating a test backup of the protected database to Recovery Appliance, you can test this backup by performing a test recovery.

To perform a test recovery of the protected database:

  1. Shutdown and restart the protected database in NOMOUNT mode.
  2. Connect to the protected database as TARGET and to the Recovery Appliance catalog as CATALOG.
  3. Configure an RMAN SBT channel for the Recovery Appliance as described in "Configuring RMAN SBT Channels for Recovery Appliance".
  4. Use the following RMAN command to restore the previously created test backup from the Recovery Appliance. Because the VALIDATE option is used, this can be done without interfering with the production database.
    RESTORE VALIDATE DATABASE;
    

If these backup and recovery procedures succeed, then the client database is ready to perform regular backups to the Recovery Appliance.

3.6.3 Performing a Test Backup Using Cloud Control

After configuring the protected database, verify that the configuration is accurate by performing a test backup.

To perform a test backup using Cloud Control:

  1. Access the home page for the protected database as described in "Accessing the Protected Database Home Page Using Cloud Control".
  2. From the Availability menu, select Backup & Recovery, then Backup Settings.

    The Device tab of the Backup Settings page is displayed. Figure 3-4 displays the Recovery Appliance Settings section of this page.

    Figure 3-4 Recovery Appliance Settings Section of Backup Settings Page

    Description of Figure 3-4 follows
    Description of "Figure 3-4 Recovery Appliance Settings Section of Backup Settings Page"
  3. In the Recovery Appliance Settings section, click Test Backup.

    A test backup is initiated by Cloud Control and the Processing: Test Recovery Appliance Backup page is displayed.

    If the backup is successful, the following message is displayed: Recovery Appliance backup test successful.

    If there is an error when performing the backup, then an error message stating "Recovery Appliance backup test failed" is displayed. Click View Error Details to display the View Error Details page containing detailed information about the cause of the error. Rectify the problem and then perform a test backup.