10 Copying Backups to Tape with Recovery Appliance

This chapter explains how to copy completed backups to tape to ensure optimal utilization of space and storage resources on Zero Data Loss Recovery Appliance.

This chapter contains the following topics:

About Copying Backups to Tape with Recovery Appliance

This section contains the following topics:

Purpose of Copying Backups to Tape with Recovery Appliance

A robust backup strategy protects data against intentional attacks, unintentional user errors (such as file deletions), and software or hardware malfunctions. Tape libraries provide effective protection against these possibilities.

The advantages of the Recovery Appliance tape solution are as follows:

  • Tape backups are ideal for long-term storage. Tapes are portable and easy to store for lengthy periods of time.

  • All tape backup operations are performed by the Recovery Appliance, with no performance load on the protected database host.

  • Tape backups are optimized. Recovery Appliance intelligently gathers the necessary blocks to create a virtual, full backup or incremental backup for tape. Although Recovery Appliance backups are incremental forever, you can create a flexible backup strategy to tape, such as weekly full and daily incremental or just daily full backups.

  • Oracle Secure Backup is pre-installed, eliminating the need for third-party media managers.

  • Tape drives and tape libraries function more efficiently because Recovery Appliance is a single large centralized system with complete control over them. In other tape solutions, hundreds or thousands of databases can compete for tape resources in an uncoordinated manner.

Overview of Copying Backups to Tape with Recovery Appliance

This section contains the following topics:

About Tape Operations on Recovery Appliance

All backups that Recovery Appliance receives from protected databases are always first stored on disk. The Recovery Appliance can then optionally copy these backups to tape. All copying to tape is automated, policy-driven, and scheduled.

A protection policy defines desired recovery windows for backups stored on tape. Recovery windows are expressed as time intervals, such as 30 days. Backups are retained on tape long enough for a recovery to be possible at any time within this interval, counting backward from the current time.

You can copy Recovery Appliance backups from disk to tape. To perform this task, you must create a tape backup job that defines the properties of the copy operation, such as the media manager library and attribute set that will manage this job, the protection policy or the database for which the backups need to be copied, and so on. After you have defined the job properties, you must schedule this job to run.

Note:

  • Only backups that have not already been copied to tape are processed in a tape backup operation for each tape backup job template with which the backup is associated. Thus, a tape backup operation on the same backup after the initial tape copy has no effect. In addition, only the most recent backup is copied to tape when the tape backup operation runs.

    If you require more than one copy of the same backup, such as to a different media family on tape, use the COPIES parameter of the template or create a separate tape backup job template for the additional copy.

  • Virtual full backups copied to tape or cloud use RMAN FILESPERSET=1 setting. Incremental backups copied to tape use the FILESPERSET setting as specified in the RMAN incremental backup command to the Recovery Appliance.

  • Backup pieces, such as archive logs, are grouped together and copied as a single piece. These backup pieces are larger on cloud or tape storage. This feature is disabled by default and can group a maximum of 64 archived logs per backup piece that is copied to cloud or tape. The effects of inter-job latencies are reduced when fewer individual pieces are transmitted.

  • Long-term archival backups that were created with the KEEP option of the BACKUP command are never automatically copied to tape. You must manually copy them using the COPY_BACKUP or MOVE_BACKUP procedure.

    See My Oracle Support Note Doc ID 2107079.1 (http://support.oracle.com/epmos/faces/DocumentDisplay?id=2107079.1) to learn how to create archival backups for long term retention on the Recovery Appliance

During a restore, Recovery Appliance transparently retrieves the backup from tape.

Recovery Appliance writes backups to tape in formats supported by RMAN. If a protected database has the required media management software (for example, Oracle Secure Backup), then it can directly restore backups written to tape by the Recovery Appliance.

Grouping Backup Pieces

The performance of copy-to-tape and archive-to-cloud is improved by grouping archived logs from protected databases' real-time redo into fewer number of backup sets.

Protected databases can achieve real-time protection by enabling real-time redo transport to the Recovery Appliance. Each received redo log on the appliance is compressed and written to the storage location as an individual archived log backup. These log backups can be archived to tape or cloud, to support fulls and incremental backups that are archived for long-term retention needs.

  • To tape: use Oracle Secure Backup (OSB) module or a third-party backup software module installed on the Recovery Appliance.

  • To cloud: use the Cloud Backup SBT module.

Inter-job latencies can happen between writing each backup piece during copy-to-tape operations. When the number of backup pieces is high, this pause constitutes a large percentage of the time the tape drive is unavailable. This means five (5) 10GB pieces will go to tape more quickly than fifty (50) 1GB pieces.

Recovery Appliance addresses inter-job latency by grouping the archived log backup pieces together and copying them as a single backup piece. Therefore this results in larger backup pieces on tape storage than previous releases. This feature is enabled by default. DMBS_RA CONFIG has the parameter group_log_max_count for setting the maximum archived logs per backup piece that is copied to tape; its default is 1. The group_log_backup_size_gb parameter is used to limit the size of these larger backup pieces; its default is 256 GB.

Recovery Appliance Components for Managing Tape Operations

Every database in a Recovery Appliance setup is associated with a protection policy that specifies the parameters for backup storage and recovery window goal. To manage and control tape operations, you must create a job that uses the properties defined by the selected protection policy, media manager library, and attribute set to copy backups to tape. Oracle Secure Backup and its components (media manager library and attribute sets) are preconfigured with Recovery Appliance.

Table 10-1 summarizes the roles of the Recovery Appliance objects for managing tape operations.

Table 10-1 Recovery Appliance Objects for Copying Backups to Tape

Cloud Control Object Name Command-line Object Name Description

Protection policy

Protection policy

Among other attributes, defines the recovery window. This recovery window is applied to all protected databases assigned to the protection policy.

Media manager library

SBT library

Describes a media management software library installed on Recovery Appliance.

Media manager attribute set

SBT attribute set

Contains a collection of attributes that control the copy operation. One attribute specifies the library to be used in the copy operation. Other attributes are optional and can include channel parameters, media management software library–specific commands, and a media pool identifier. You can define multiple attribute sets, but only one attribute set is associated with a given copy job.

Copy-to-tape job template

SBT job template

Defines the properties of backups to be copied to tape and specifies an attribute set to control the copy operation. Typically, multiple job templates are defined.

Note:

The Oracle Enterprise Manager Cloud Control (Cloud Control) object name and the command-line name in Table 10-1 refer to the same tape backup objects, with their respective interface terms.

See Also:

"Basic Tasks for Copying Backups to Tape with Recovery Appliance" for more information on how to create a tape backup job using these components

Backup Retention on Tape

You can control the length of time that backup copies are retained on tape by specifying a recovery window. A recovery window defines how long the Recovery Appliance maintains tape backups in its catalog for recovery purposes. The recovery window is expressed as an interval, in values of hours, days, weeks, or months. Backups are retained long enough to guarantee that a recovery is possible to any point in time within this interval, counting backward from the current time.

Note:

Recovery windows directly apply only to full or level 0 data file and control file backups.

Recovery Appliance does not purge tape backups. Instead, it informs the media manager which pieces are no longer needed for RMAN retention. With Oracle Secure Backup as the media manager, it does not explicitly delete these files, it updates its catalog. After all files on a given tape are no longer needed, Oracle Secure Backup considers the tape for reuse.

You set the recovery window for a backup by providing a value for it in the protection policy. If this attribute is NULL, then Recovery Appliance never purges the backup from tape.

See Also:

About Pausing and Resuming Tape Backup Operations

You might want to pause the copying of backups to tape for these reasons:

  • To investigate previous backup copy failures

  • To perform maintenance operations on tape devices

You pause tape backup operations for a specific media management software library by pausing its corresponding media manager library.

When you pause a media manager library, in-progress copies of backup pieces are allowed to complete, while backup pieces that were queued for copy but not yet copied are held until you resume the library. Pausing a library suspends future scheduled runs of tape backup jobs that reference the media manager library.

Note:

Tape backup jobs reference media manager libraries indirectly through their assigned media manager attribute sets.

About Using Oracle Secure Backup with Recovery Appliance

Oracle Secure Backup is a media manager that provides reliable, centralized tape management by protecting file-system data and Oracle Database files for multiple environments. Oracle Secure Backup is the tape management component for Recovery Appliance. It is installed with its components on the Recovery Appliance during its configuration.

Preconfigured Oracle Secure Backup components include the following:

Media Manager Library

During its installation, while Recovery Appliance is being configured, Oracle Secure Backup creates a media manager library with default parameters, such as the following:

  • Library name (ROBOT0)

  • Maximum number of accessible tape drives

  • Number of restore drives

  • Media manager location

Apart from the name, other media manager library parameters can be modified. This library manages the tape backup operations associated with it, based on the parameters set.

Media Manager Attribute Sets

Along with a media manager library, Oracle Secure Backup also comes installed with attribute sets for all tape drives that the default media manager library accesses.

These attribute sets have default values for parameters like the media pool number and streams required for the copy operation. These and the media manager vendor parameters and commands can be modified. The default attribute sets are named DRIVE_COUNT_1, DRIVE_COUNT_2, DRIVE_COUNT_3, and so on for the number of tape drives accessed by the media manager library.

See Also:

User Interfaces for Recovery Appliance

You can manage and perform tape backup job operations by using either Cloud Control or the Recovery Appliance command-line options.

This section contains the following topics:

Accessing Recovery Appliance in Cloud Control

To access Recovery Appliance using Cloud Control, complete the steps listed in "Accessing the Recovery Appliance Home Page".

Accessing Recovery Appliance Using DBMS_RA
DBMS_RA Procedures for Tape Backup Operations

This section lists the Recovery Appliance DBMS_RA procedures that are associated with SBT job operations. They are applicable for tape, cloud, and archive operations.

See Also:

"DBMS_RA Package Reference" for more information on other Recovery Appliance DBMS_RA procedures

Recovery Catalog Views for Tape Operations

This section lists the Recovery Appliance recovery catalog views that are associated with SBT job operations:

See Also:

"Recovery Appliance View Reference" for more information on other Recovery Appliance data dictionary views

Basic Tasks for Copying Backups to Tape with Recovery Appliance

This section lists the high level essential steps to copy database backups to tape using Recovery Appliance.

To copy backups to tape using Recovery Appliance:

  1. Create a media manager library for your media management software to manage all your tape backup jobs by adding parameters that apply to a set of jobs.

    Recovery Appliance uses Oracle Secure Backup as its media management software. During its setup, Recovery Appliance installs Oracle Secure Backup with a preconfigured media manager library and attribute sets.

    See Also:

    "Creating a Media Manager Library" for more information on how to create additional media manager libraries

  2. Create a media manager attribute set that helps you control your tape backup jobs further by adding more job-specific parameters and commands for your media manager software.

    Tape backup jobs use a combination of parameters specified at the media manager library level and the attribute set level while performing the copy operation. Media manager libraries define parameters that apply to a set of jobs while attribute sets help further define tape backup settings for specified jobs.

    Oracle Secure Backup also configures default attribute sets for all drives that are a part of the default media manager library.

    See Also:

    "Creating an Attribute Set" for more information on creating additional attribute sets

  3. Create a tape backup job.

    The job definition includes job properties such as the media manager library and attribute set associated with this job, the type of backups that need to be copied to tape, the run-time window for this job, and so on.

    You can also schedule this job to run at a specified time according to your task requirements.

    See Also:

    "Creating a Tape Backup Job" for more information on creating tape backup jobs

  4. (Optional) If required, pause or resume a media manager library or a tape backup job.

  5. View the status of all media manager libraries and tape backup operations to check for errors.

You may want to create additional media families for refining backup properties or to schedule vaulting to manage your tape. Use the Recovery Appliance Oracle Secure Backup domain to complete these tasks.

See Also:

Accessing the Oracle Secure Backup Domain Using Cloud Control

Use Cloud Control to access the Oracle Secure Backup domain. You can use this domain to manage (if required) the existing Oracle Secure Backup configurations set for the selected Recovery Appliance environment.

To access the Oracle Secure Backup domain using Cloud Control:

  1. From the Cloud Control Home page, select Targets.

  2. From the Targets Menu, select All Targets.

    The All Targets page appears.

  3. On the All Targets page, under the Refine Search Menu, select Databases as the Target Type.

  4. Under the Databases section, select Oracle Secure Backup Domain.

    A list of all Oracle Secure Backup Domains for all existing Recovery Appliance targets appears.

  5. From the list of targets, click the target for which you want to access the Oracle Secure Backup domain.

    The Oracle Secure Backup domain for the selected Recovery Appliance appears.

Creating Tape Backup Job Components

To successfully create a tape backup job, you must first ensure that its components exist. A media manager library and its attribute sets are essential for a tape backup operation. These components define a combination of parameters for a tape backup job and help categorize these jobs when storing them on tape.

See Also:

"Recovery Appliance Components for Managing Tape Operations" for more information on the role of a media manager library and its attribute sets

This section contains the following topics:

Creating a Media Manager Library

A media manager library sets the properties for a tape backup job by defining parameters like the number of tape drives it can access. Optional advanced parameters include specifying the number of required restore drives and media manager parameters.

Recovery Appliance comes with Oracle Secure Backup as its preconfigured media manager. During the Recovery Appliance configuration, a media manager library is also configured for Oracle Secure Backup, typically named ROBOT0. It is recommended that you only use the preconfigured media manager objects. The media manager (Oracle Secure Backup, in this case) must have only a single media manager library as more than one library object will result in a conflict between the tape backup jobs created and the media manager resources handling these jobs. Currently, you cannot install Oracle Secure Backup in the Recovery Appliance in client only .

If you are using third-party media management software, you must install its backup agent on the Recovery Appliance compute servers. To schedule a tape backup job using the third-party product, you must create a new media manager library and add RMAN parameters applicable for that media manager for backups over LAN to tape devices attached to the backup application's media servers. In this scenario, you will not be able to use the media manager components preconfigured for Oracle Secure Backup and cannot directly attach tape devices to the Recovery Appliance.

This section describes the steps to create an additional media manager library for a third-party media manager.

To create a media manager library with Cloud Control:

  1. Complete the steps in "Accessing the Recovery Appliance Home Page".

    On the Recovery Appliance Home page, select Media Managers from the Recovery Appliance Menu. It displays the Media Managers screen with the default Oracle Secure Backup library and its corresponding attribute sets.

    Figure 10-1 Media Managers Page

    Displays Media Managers for a Recovery Appliance in Cloud Control.
  2. On the Media Managers page, click Create to configure a new media manager library.

    The Create Media Manager Library and Initial Attribute Set dialogue box appears.

  3. In the Media Manager Library section, enter a name for this library.

  4. In the Maximum Channels field, select the maximum number of media channels this media manager library can access.

  5. Optionally, you can choose to enter Advanced Parameters for this media manager library.

    1. In the Restore Channels field, specify the number of media channels that you want to reserve for restore operations. If you do not enter any restore channel value, then the current restore operation uses the first free media channels that is available once all the backup operations are complete.

    2. In the Media Management Vendor Parameters, you can choose to add additional parameters to define your media manager library.

      For example, a media manager vendor parameter for Oracle Secure Backup contains the SBT_LIBRARY parameter by default, which specifies the path of the media manager library.

    If you are using a third party product as your media manager, create a new media library and use product-specific parameters for the specified media manager, especially the SBT_LIBRARY location parameter.

  6. To add the initial attribute set for this library, complete the steps in the section "Creating an Attribute Set".

    If you do not enter any values for the attribute set, default values are applied.

  7. Click OK.

To create a media manager library with DBMS_RA:

  1. Start SQL*Plus or SQL Developer, and then log in to the metadata database as RASYS or as a named db_user with user_type=admin.

  2. Run the DBMS_RA.CREATE_SBT_LIBRARY procedure.

    BEGIN
       DBMS_RA.CREATE_SBT_LIBRARY(
         lib_name       => 'osbsbt',
         drives         => 12,
         restore_drives => 2,
         parms          => 'SBT_LIBRARY=libobk.so');
    END;
    

    In this example, the media management software is Oracle Secure Backup. The drives argument specifies the maximum number of tape drives that this SBT library can access. The restore_drives argument sets the number of tape drives that will be reserved for restore operations. The parms argument has the same purpose and format as the PARMS clause of an RMAN ALLOCATE CHANNEL command. It typically includes at least the SBT_LIBRARY parameter. In this case it designates the shared library for the Oracle Secure Backup media family.

See Also:

"CREATE_SBT_LIBRARY" for descriptions of procedure arguments

Creating an Attribute Set

An SBT attribute set is referenced by an SBT job and is a collection of attributes that controls a tape backup operation. The attribute set specifies the SBT library to use for the copy operation. It also specifies SBT channel parameters and parameters to pass to the media management software library. These parameters are merged with the parameters specified in the SBT library object.

A SBT attribute set helps you to further customize and categorize your backups while copying them to tape. An attribute set is created for each tape drive associated with its media manager library. It helps classify backups while storing them on tape by specifying parameters such as the media pool number, streams, and media manager commands needed to perform the tape backup operation.

Note:

If all SBT attribute sets share the same parameter value, then you can specify that parameter in the SBT library object instead of in each SBT attribute set.

Recovery Appliance comes with Oracle Secure Backup pre-configured as its media manager. Oracle Secure Backup components which include a media manager library and attribute sets for each of its tape drives, are also preconfigured. The preconfigured attribute sets are typically named DRIVE_COUNT_1, DRIVE_COUNT_2, and so on for the number of existing tape drives.

This section describes how to create additional attribute sets for third-party media managers using either Cloud Control or DBMS_RA.

To create an SBT attribute set with Cloud Control:

You create the initial attribute set for a media manager library while creating the media manager library itself. If you leave the initial attribute set fields empty while configuring the media manager library, the default values are used.

You can also use the following steps to create additional attribute sets for a third-party media manager library.

  1. Complete the steps in "Accessing Recovery Appliance in Cloud Control".

    From the Recovery Appliance menu, select Media Managers.

  2. Under the Attribute Sets section, click Create.

    The Create Attribute Set box appears.

  3. In the Name field, enter a name for this attribute set.

  4. Optionally, in the Pool ID field, enter the media pool number that will be used to store backup copies.

  5. Optionally, in the Streams field, specify the maximum number of streams that will be used to perform the tape backup operation.

    If you do not enter any value, then all available streams will be used.

  6. Optionally, use the Media Management Vendor Parameters field to specify additional parameters to define your tape backup job. The Recovery Appliance uses a combination of these parameters and the media manager library parameters to complete the tape backup job.

  7. Optionally, in the Media Management Vendor Commands field, enter vendor-specific commands for your media manager software to control your tape backup job.

  8. Click OK.

To create an SBT attribute set with DBMS_RA:

  1. With SQL*Plus or SQL Developer, connect to the Recovery Appliance database as an administrator of the Recovery Appliance.

  2. Run the DBMS_RA.CREATE_SBT_ATTRIBUTE_SET procedure for each SBT attribute set that you want to create.

    BEGIN
      DBMS_RA.CREATE_SBT_ATTRIBUTE_SET(
        lib_name             => 'osbsbt',
        attribute_set_name   => 'wholedb',
        streams              => 10,
        parms                => 'ENV=(OB_MEDIA_FAMILY=wholedb_mf)');
    END;
    

    Again in this example, the media management software is Oracle Secure Backup (OSB). The streams argument sets the maximum number of concurrent streams that can be used for automated backups. The parms argument has the same purpose and format as the PARMS clause of an RMAN ALLOCATE CHANNEL command. In this case it designates the wholedb_mf Oracle Secure Backup media family as the destination of the copy operation.

See Also:

Managing Tape Backup Job Components

After you have created your tape backup job components, you may need to modify their properties periodically based on job requirements or delete them when no longer required.

This section contains the following topics:

Managing a Media Manager Library Using Cloud Control

You can edit the existing properties of a media manager library to update parameters based on your tape backup job requirements.

You can delete an existing media manager library after all tape backup operations associated with this media manager are complete and you no longer require the parameters specified as a part of this library.

Figure 10-2 Media Managers Page

Displays Media Managers for a Recovery Appliance in Cloud Control.

To edit a Media Manager library:

  1. Complete the steps in "Accessing the Recovery Appliance Home Page".

    On the Recovery Appliance Home page, select Media Managers from the Recovery Appliance menu.

  2. On the Media Managers page, select the Media Manager library that you want to edit and click Edit.

    The Edit Media Manager Library screen appears with the existing library parameters.

    Figure 10-3 Edit Media Manager Library Screen

    Description of Figure 10-3 follows
    Description of "Figure 10-3 Edit Media Manager Library Screen"
  3. Change the number of Maximum Channels.

  4. Click OK.

To delete a Media Manager library:

  1. Complete the steps in "Accessing Recovery Appliance in Cloud Control".

  2. From the Recovery Appliance Menu, select Media Managers.

  3. From the list of existing media manager libraries, select the Media Manager Library you want to delete.

  4. Click Delete.

    A message asks you confirm the deletion of this library.

  5. Click Yes.

Managing an Attribute Set Using Cloud Control

This section contains information on how to edit or delete an attribute set using Cloud Control.

To edit an attribute set:

You can edit the existing properties of a media manager attribute set to modify your tape backup job settings at a job-specific level.

  1. Complete the steps "Accessing Recovery Appliance in Cloud Control".

  2. From the Recovery Appliance Menu, select Media Managers.

  3. From the list of attribute sets, select one attribute set that you need to edit.

  4. Make the required changes to the Pool ID, Media Management Vendor Parameters, and Media Management Vendor Command values.

  5. Click OK.

To delete an attribute set:

You can delete an existing attribute set after all associated tape backup jobs are complete and you no longer require the job parameters specified in the attribute set.

  1. Complete the steps in "Accessing Recovery Appliance in Cloud Control".

  2. From the Recovery Appliance Menu, select Media Managers.

  3. In the Attribute Sets section, select the attribute list that you want to delete.

  4. Click Delete.

    A message asks you to confirm deletion of this attribute set.

  5. Click Yes.

Managing an SBT Library Using DBMS_RA

This section contains information on how to use DBMS_RA to edit or delete an SBT library.

To edit an SBT library:

To delete an SBT library:

You can delete an SBT library by calling the given procedure in the DBMS_RA PL/SQL package.

  1. Using SQL*Plus or SQL Developer, connect to the Recovery Appliance metadata database as the Recovery Appliance administrator.

  2. Run the DELETE_SBT_LIBRARY procedure, providing the name of the SBT object to delete.

    BEGIN
      DBMS_RA.DELETE_SBT_LIBRARY(
        lib_name => 'OSBSBT');
    END;

Managing an Attribute Set Using DBMS_RA

This section contains information on how to edit or delete an attribute set using DBMS_RA.

To edit an attribute set:

You can modify one or more attributes of an SBT attribute set by calling the given procedure in the DBMS_RA PL/SQL package.

  1. Using SQL*Plus or SQL Developer, connect to the Recovery Appliance database as the Recovery Appliance administrator.

  2. Run the UPDATE_SBT_ATTRIBUTE_SET procedure, providing the name of the SBT attribute set to modify and the new values for its attributes.

    Attributes omitted from the procedure call are left unchanged.

To delete an attribute set:

You can delete an SBT attribute set by calling the given procedure in the DBMS_RA PL/SQL package.

  1. Using SQL*Plus or SQL Developer, connect to the Recovery Appliance database as the Recovery Appliance administrator.

  2. Run the DELETE_SBT_ATTRIBUTE_SET procedure, providing the name of the SBT object to delete.

Creating a Tape Backup Job

This section describes how to create tape backup jobs for a selected database or databases associated with a protection policy. The tape backup job templates define the properties for backups that need to be stored on tape. Media manager libraries and their attribute sets manage these job settings.

Recovery Appliance gives you the option to copy backups from multiple protected databases to tape. To perform this task, specify the protection policy that contains the protected databases for which you want to copy backups to tape. Alternatively, you can also copy backups to tape for a single specified database.

You can create a tape backup job using Cloud Control or command-line options.

To create a tape backup job with Cloud Control:

  1. Complete the steps in "Accessing the Recovery Appliance Home Page"

  2. On the Recovery Appliance Home page, from the Recovery Appliance menu, select Copy-To-Media Job Templates.

    The Copy-to-Media Job Templates page appears.

  3. Click Create to create a new media backup job.

    The Create Copy-to-Media Job Template page appears as shown in **INTERNAL XREF ERROR**.

    This page displays the job properties and schedule settings.

    Figure 10-4 Recovery Appliance Create Copy-to-Media Job Template Page

    Description of Figure 10-4 follows
    Description of "Figure 10-4 Recovery Appliance Create Copy-to-Media Job Template Page"
  4. In the Name field, enter a name for the job.

  5. Optionally, from the Media Manager Library drop-down list, select a media manager library that will manage this job.

  6. From the Attribute Set drop-down list, select an attribute set that you want to use for this job. This attribute set will define the settings for your tape backup job.

  7. In the Scope field, add one of the following:

    • Select the protection policy from the Protection Policy drop-down list that includes all the databases for which you want to copy the backups to tape.

    • Search for and select a single database for which you want to copy the backups to tape.

  8. In the Backup Type field, select the type of backup to be copied. Options include: Full backup, Incremental Backup, and Archived Log.

  9. (Optional) In the Advanced Properties area, use the Priority drop-down to specify the priority for this job. The default job priority is Medium.

  10. In the Advanced Properties area, use the Number of copies drop-down to specify the number of copies you need for the backup being copied to media. You can choose a maximum of 4 copies and a minimum of 1 copy.

    Note:

    You cannot obtain duplicate copies of a backup after it has been copied to tape.

  11. In the Advanced Properties area, use the Runtime Window field to specify the amount of time in minutes, hours or days allowed for this job to complete. Jobs that do not start within the specified window will be completed in the next available window slot.

  12. In the From Tag field, specify a tag name to only copy backups associated with a certain tag to tape.

  13. Under the Schedule section, specify whether you want this job to run immediately or at a later specified time.

  14. In the Properties section, you can specify optional properties that are applied to the backup pieces being copied to media. These include Format, Autobackup Prefix, and Tag.

  15. Click OK.

    Cloud Control displays a message notifying that your job request has been submitted successfully.

    You can click the job name in the message to check the queued backup images for this job.

To create a tape backup job with DBMS_RA:

Each SBT job defines the backups to be copied to tape and the media pool to which to copy them. After you create SBT jobs, you must schedule their execution.

  1. Log in to SQL*Plus or SQL Developer with an admin db_user user.

  2. Run the CREATE_SBT_JOB_TEMPLATE procedure for each SBT job that you want to create.

    Note:

    CREATE_SBT_JOB_TEMPLATE is an overloaded procedure. With one procedure signature, you specify the db_unique_name of a protected database for which to consider backups for copying. With the other procedure signature, shown below, you specify a protection policy name. In this case, backups for all protected databases assigned to the protection policy are considered for copying.

  3. If a protection policy name is specified with the protection_policy_name parameter, then when the SBT job runs, backups for all databases assigned to the protection policy are considered for copying to tape. If a db_unique_name is specified, then only backups for that database are considered for copying.

  4. Using the attribute_set_name parameter, specify the name of an SBT attribute set, which is a collection of attributes that control tape backup operations. The attribute set specifies the SBT library to use for the copy operation. It also specifies SBT channel parameters and parameters to pass to the media management software library. These parameters are merged with the parameters specified in the SBT library object.

  5. Using the backup_type parameter, add the types of backups to copy, expressed as a comma-delimited list of the following types: ALL, INCR, ARCH, or FULL. For example, if 'INCR,ARCH' is specified, then all incremental (level 1) backups and archived log files that have not yet been copied to the named media manager are included.

  6. With the priority parameter, enter a priority level for this job. When many SBT jobs are scheduled to run simultaneously, the job priority determines the job that runs first. Job priority is needed when there are not enough tape drives to service all of the jobs that are scheduled to run simultaneously. Job priority is expressed as one of the following predefined values:

    • 1000 (SBT_PRORITY_LOW)

    • 100 (SBT_PRIORITY_MEDIUM)

    • 10 (SBT_PRIORITY_HIGH)

    • 1 (SBT_PRIORITY_CRITICAL)

    0 is the highest possible priority. Lower priority values take precedence over higher values. The default priority is 100 (SBT_PRIORITY_MEDIUM).

Example of Creating a Tape Backup Job

To create a tape backup job with Cloud Control:

This example uses a combination of tape backup jobs to manage copying all your backups to tape and ensure that they are up-to-date. The combination of tape backup jobs stores all your backups on tape systematically and reduces chances of loss of information.

  1. Create your first tape backup job and name this job Test1.

  2. Use the default media manager library (example GCM_SAMPLE) and the attribute set (example GCM_UAD) for this job.

    Edit the default media manager library values and default attribute set values, as per "Managing Tape Backup Job Components".

  3. Select the scope of this job as the Protection Policy GOLD.

  4. Select Full as the Backup Type for this job.

    This selection implies that all your full database backups for databases included in GOLD will be copied to tape.

  5. Schedule Test1 to run on Sunday at 11:11 am and set it to repeat every 1 week.

  6. Similarly, create a second tape backup job and name this job Test2.

  7. Let this job use the same media manager library, protection policy and attribute set as Test1.

  8. Select INCR (incremental) from the Backup Type drop-down list for this job.

  9. Schedule Test2 to run from Monday to Saturday at 12:30 pm and set it to repeat daily.

  10. Using the same steps as above, create a third tape backup job and name it Test3.

  11. Select ARCH (Archived Logs) as the Backup Type for this job.

  12. Schedule Test3 to run at 6 hour intervals.

**INTERNAL XREF ERROR** displays the Recovery Appliance Copy-to-Tape Templates screen after these jobs have been successfully submitted.

Figure 10-5 Tape Backup Jobs Example

Description of Figure 10-5 follows
Description of "Figure 10-5 Tape Backup Jobs Example"

In this scenario, the Recovery Appliance copies all full backups to tape once a week. Afterward, the Recovery Appliance copies all incremental backups with the latest changes daily to maintain the updated backup copies on tape. Similarly, the system copies all archived redo log files every 6 hours to ensure efficient copy and storage of backups on tape.

To create a tape backup job with DBMS_RA:

This example illustrates how to create an SBT job using the CREATE_SBT_JOB_TEMPLATE procedure.

BEGIN
  DBMS_RA.CREATE_SBT_JOB_TEMPLATE (
    template_name           => 'oltp_arch_lastfull',
    protection_policy_name  => 'oltp',
    attribute_set_name      => 'wholedb',
    backup_type             => 'FULL,ARCH',
    priority                => DBMS_RA.SBT_PRIORITY_HIGH,
    window                  => INTERVAL '4' HOUR);
END;

In this example, the SBT job selects all archived log files and the last full backup for every protected database assigned to the oltp protection policy. The last full backup could be either the most recent level 0 backup received, or a virtual full backup based on the most recent level 1 backup received, whichever is later.

The SBT job references the wholedb SBT attribute set, which specifies the SBT library to use for the copy operation, and specifies SBT channel parameters and parameters to pass to the media management software library.

The backup_type parameter copies all archived log backups not yet copied to SBT and the most recent full backup, if it has not already been copied to tape. For example, the backup_type of "full, arch" selects all archived log backups, and the most recent full backup. These are the backups that will be copied to SBT when this job is run, if they have not already been copied.

The four-hour window specifies the length of time that copy tasks generated by this job are eligible to be started. When the window expires, any SBT copy tasks that were generated by this job but not yet started will be suspended until the next time this SBT job is scheduled. Copy tasks that are already running when the window expires are allowed to complete.

Not shown are the optional copies and from_tag arguments.

Managing a Tape Backup Job

After you have created a tape backup job, you may need to modify some of its properties based on job requirements or delete it when no longer required.

See Also:

"Creating a Tape Backup Job" for more information on how to create a tape backup job

To manage a tape backup job with Cloud Control:

Edit Tape Backup Job

  1. Complete the steps in "Creating a Tape Backup Job".

  2. Select the tape backup job that you want to edit.

  3. Click Edit to change the existing job properties and schedule settings.

  4. Make the required changes to the existing Media Manager Library, Attribute Set, Priority, Copies, Runtime Window, and From Tag values, to edit job properties.

  5. Make changes the existing schedule options, to edit the job schedule settings.

  6. Click OK.

Delete Tape Backup Job

  1. Complete the steps in "Accessing the Recovery Appliance Home Page".

  2. On the Recovery Appliance Home page, from the Recovery Appliance menu, select Copy-to-Tape Job Templates.

    The Copy-to-Tape Job Template page appears.

  3. From the list of jobs, select the job that you want to delete.

  4. Click Delete.

    A confirmation message appears asking whether you want to continue with deleting this job. Click Yes.

To manage a tape backup job with DBMS_RA:

Edit Tape Backup Job

You can modify one or more attributes of an SBT job by calling the given procedure in the DBMS_RA PL/SQL package.

  1. Using SQL*Plus or SQL Developer, connect to the Recovery Appliance database as the Recovery Appliance administrator.

  2. Run the UPDATE_SBT_JOB_TEMPLATE procedure, providing the name of the SBT job to modify and the new values for its attributes.

    This example modifies the priority of the SBT job named oltp_arch_lastfull. The values of other arguments present in CREATE_SBT_JOB_TEMPLATE and omitted in this call remain unchanged.

    BEGIN
      DBMS_RA.UPDATE_SBT_JOB_TEMPLATE(
        template_name => 'oltp_arch_lastfull',
        priority      => DBMS_RA.SBT_PRIORITY_HIGH);
    END;

Delete Tape Backup Job

You can delete a SBT job by calling the given DBMS_RA PL/SQL package procedure.

  1. Using SQL*Plus or SQL Developer, connect to the Recovery Appliance metadata database as the Recovery Appliance administrator.

  2. Run the DELETE_SBT_JOB_TEMPLATE procedure, providing the name of the SBT job to delete.

Scheduling a Tape Backup Job

This section describes the steps required to set the schedule for a tape backup job.

To schedule a tape backup job with Cloud Control:

  1. Complete the steps in "Accessing Recovery Appliance in Cloud Control".

  2. In the Schedule section, select one of the following:

    • Immediately: Runs the tape backup job right away.

    • Later: Runs the tape backup job at a future, specified time. Enter the date and time when you want the job to run in the mm/dd/yyyy hh:mm:ss format. If you want this job to repeat, then select the frequency from the Repeat drop-down list and enter the applicable values.

  3. Click OK to save the job.

    To edit the schedule settings, select the required tape backup job, click Edit, and make the necessary changes.

To schedule a tape backup job with DBMS_RA:

After creating an SBT job, you must schedule its execution. Typically, you schedule the job to run at regular intervals using a scheduling utility such as Oracle Scheduler.

When an SBT job runs, Recovery Appliance examines all backups of the specified type for the specified databases, and selects the ones that have not yet been copied to tape. Recovery Appliance then generates and queues tasks that copy those backups to tape. One task of type BACKUP_SBT is added to the Recovery Appliance task queue for each backup piece to copy.

To schedule a tape backup job with Oracle Scheduler, you create a job that will invoke DBMS_RA.QUEUE_SBT_BACKUP_TASK. This procedure takes a single argument, the name of the SBT job.

  1. With SQL*Plus or SQL Developer, connect to the Recovery Appliance database as the Recovery Appliance administrator.

  2. Run DBMS_SCHEDULER.CREATE_JOB.

    For example, run the following PL/SQL anonymous block:

    BEGIN
      DBMS_SCHEDULER.CREATE_JOB(
       job_name   => 'sbtjob1',
       job_type        => 'PLSQL_BLOCK',
       job_action      => 'dbms_ra.queue_sbt_backup_task(''oltp_arch_lastfull'');',
       start_date      => SYSTIMESTAMP,
       enabled         => TRUE,
       auto_drop       => TRUE,
       repeat_interval => 'freq=WEEKLY; BYDAY=MON,WED,FRI; BYHOUR=23');
    END;

See Also:

Pausing and Resuming Tape Backup Operations

This section describes the steps to pause an ongoing tape backup job or media manager operations and how to resume them later.

To pause and resume tape backup operations with Cloud Control:

You pause ongoing media manager library operations in a situation where you want to put the current media manager library on hold and resume it after a certain period.

  1. Complete the steps in "Accessing Recovery Appliance in Cloud Control".

  2. From the Recovery Appliance Menu, select Media Managers.

  3. From the list of media manager libraries, select the library for which you want to pause all ongoing jobs.

  4. Click Pause.

You can resume operations of any paused media manager library for the library and its associated job operations to continue.

  1. Complete the steps in "Accessing Recovery Appliance in Cloud Control".

  2. From the Recovery Appliance Menu, select Media Managers.

  3. Select the paused media manager library for which you want to resume job operations.

  4. Click Resume.

To pause and resume tape backup operations with DBMS_RA:

Pause Tape Backup

  1. With SQL*Plus or SQL Developer, connect to the Recovery Appliance database as the Recovery Appliance administrator.

  2. Run the DBMS_RA.PAUSE_SBT_LIBRARY procedure.

    For example, run the following PL/SQL anonymous block:

    BEGIN
      DBMS_RA.PAUSE_SBT_LIBRARY(
        lib_name => 'osbsbt');
    END;
    

    The library status in the view RA_SBT_LIBRARY changes to PAUSE.

Resume Tape Backup

  1. With SQL*Plus or SQL Developer, connect to the Recovery Appliance metadata database as the Recovery Appliance administrator.

  2. Run the DBMS_RA.RESUME_SBT_LIBRARY procedure.

    For example, run the following PL/SQL anonymous block:

    BEGIN
      DBMS_RA.RESUME_SBT_LIBRARY(
        lib_name => 'osbsbt');
    END;
    

The library status in the view RA_SBT_LIBRARY changes back to READY.

Viewing the Status of Tape Backup Operations

This section describes the steps to check the status of media manager library and tape backup jobs to monitor the progress of their operations.

This section contains the following topics:

Viewing the Status of Tape Backup Operations Using Cloud Control

This section contains the following topics:

Viewing the Media Manager Library Status

You can check for any errors in the media management software that may affect the ongoing tape backup operations by viewing the current status of a media manager library.

To check the status of a media manager library:

  1. Complete the steps "Accessing Recovery Appliance in Cloud Control".

  2. From the Recovery Appliance Menu, select Media Managers.

    The Media Managers page lists the status of all existing media manager libraries in the corresponding column.

Viewing the Tape Backup Job Status

You can check for any error in the ongoing tape backup operation by viewing the current status of the job.

To view the status of a tape backup job:

  1. Complete the steps "Accessing Recovery Appliance in Cloud Control".

  2. From the Recovery Appliance Menu, select Copy-to-Tape Job Templates.

    The Copy-to-Tape Job Templates Page displays the status of each tape backup job in its corresponding column.

Viewing the Status of Tape Backup Operations Using DBMS_RA

This section contains the following topics:

Checking the SBT Library Status

You can determine if an error condition exists in the media management software by querying the RA_SBT_LIBRARY view. You can also determine the PAUSE state of an SBT library.

To view the status of an SBT library:

  1. With SQL*Plus or SQL Developer, connect to the Recovery Appliance metadata database as the Recovery Appliance administrator.

  2. Run the following query:

    SELECT LIB_NAME, LAST_ERROR_TEXT, STATUS 
    FROM   RA_SBT_LIBRARY;
    
    LIB_NAME            LAST_ERROR_TEXT                                 STATUS 
    ------------------- ----------------------------------------------- ------ 
    OSBSBT                                                              READY  
    

    Table 10-3 lists the possible values for STATUS.

    Table 10-3 Values for the STATUS Column of RA_SBT_LIBRARY

    Value Meaning

    READY

    The SBT library was properly created and is ready to process tape I/O.

    PAUSE

    The SBT library was paused with PAUSE_SBT_LIBRARY.

    ERROR

    An error condition exists in the media management software. Tape backup operations cannot continue until you clear the error and call RESUME_SBT_LIBRARY. The last_error_text column describes the most recent error returned by the media management library. The error text also appears in the RA_SBT_TASK rows for the affected background SBT tasks.

See Also:

"RA_SBT_LIBRARY"

Checking the Tape Backup Job Status

When an SBT job runs it generates and queues a task for each backup piece to be copied. The view RA_SBT_TASK lists these tasks and their completion states.

Note:

Completed tasks are removed from this view after 30 days.

To check the status of SBT jobs:

  1. With SQL*Plus or SQL Developer, connect to the Recovery Appliance metadata database as the Recovery Appliance administrator.

  2. Run the following query (sample output shown):

    SELECT TASK_ID, STATE, DB_UNIQUE_NAME, ERROR_TEXT, BS_KEY, PIECE#
    FROM   RA_SBT_TASK 
    WHERE  SBT_TEMPLATE_NAME = 'SBTJOB1'
    ORDER BY DB_UNIQUE_NAME, BS_KEY, PIECE#;
    
    TASK_ID STATE      DB_UNIQUE_NAME ERROR_TEXT           BS_KEY PIECE#
    ------- ---------- -------------- -------------------- ------ ------
        253 COMPLETED  OLTP1                                   89      1
        254 COMPLETED  OLTP1                                   95      1
        255 COMPLETED  OLTP1                                   99      1
        256 COMPLETED  OLTP1                                  117      1
        257 COMPLETED  OLTP1                                  141      1
    

    A task failed if its STATE is KILLED or ABORTED.

Reviewing SBT Job Runs Using DBMS_RA

You can determine whether SBT jobs run according to your defined schedule by querying the RA_SBT_JOB.LAST_SCHEDULE_TIME column. This column indicates the last time that the SBT job was scheduled to run.

To review completed SBT jobs:

  1. With SQL*Plus or SQL Developer, connect to the Recovery Appliance metadata database as the Recovery Appliance administrator.

  2. Run the following query (sample output shown):

    SELECT TEMPLATE_NAME, BACKUP_TYPE, LAST_SCHEDULE_TIME 
    FROM   RA_SBT_JOB;
    
    TEMPLATE_NAME          BACKUP_TYPE          LAST_SCHEDULE_TIME
    ------------------  -------------------  ----------------------------
    OLTP_ARCH_LASTFULL  ARCH, FULL           27-AUG-12 10.53.49 AM -08:00
    OLTP_INCR           INCR                 26-AUG-12 10.16.16 AM -08:00

See Also:

"RA_SBT_LIBRARY"

Checking the Status of Oracle Scheduler Jobs

To view the status of an Oracle Scheduler job created to run an SBT job:

  • Query the following views:

    • USER_SCHEDULER_JOBS

    • USER_SCHEDULER_JOB_LOG

See Also:

Oracle Database Administrator's Guide for details about data dictionary views for Oracle Scheduler