7 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
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.
See Also:
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 theFILESPERSET
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 in release 19.2.1.1.2. This feature is enabled by default and groups 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 theBACKUP
command are never automatically copied to tape. You must manually copy them using theCOPY_BACKUP
orMOVE_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 and archive-to-cloud operations.
-
To tape: there is a pause between each backup piece as it is written. 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.
-
To cloud: operations are constrained by public WAN bandwidth. Although increasing the number of copy-to-cloud streams from the Recovery Appliance can help improve overall performance, log grouping means fewer backup pieces to copy, thus reducing the number of round trip requests.
Recovery Appliance Release 19.2.1.1.2 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 cloud or tape storage than previous releases. This feature is enabled by default and groups a maximum of 64 archived logs per backup piece that is copied to cloud or tape.
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 7-1 summarizes the roles of the Recovery Appliance objects for managing tape operations.
Table 7-1 Recovery Appliance Objects for Copying Backups to Tape
Cloud Control Object Name | Command-line Object Name | Description |
---|---|---|
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 |
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 as described in "Example: Creating a Tape Backup Job Using Cloud Control". |
Note:
The Oracle Enterprise Manager Cloud Control (Cloud Control) object name and the command-line name in Table 7-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:
-
"Creating a Protection Policy Using Cloud Control" for more information on setting recovery window goals using Cloud Control
-
"Creating a Protection Policy Using DBMS_RA" for more information on setting an SBT recovery window using command-line
-
Oracle Database Backup and Recovery User's Guide for a thorough discussion of recovery windows
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:
-
"Accessing the Oracle Secure Backup Domain Using Cloud Control" for more information on how to access the Oracle Secure Backup domain using Cloud Control
-
"Creating Tape Backup Job Components" for more information on how to create a media manager library and attribute sets for third-party media managers
-
"Managing Tape Backup Job Components" for more information on how to edit and control existing media manager components
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
This section contains the following topics:
DBMS_RA Procedures for Tape Backup Operations
Table 7-2 lists the Recovery Appliance DBMS_RA
procedures that are associated with SBT job operations:
Table 7-2 DBMS_RA Procedures Associated with Tape Backup Operations
SBT Object | Procedures |
---|---|
SBT Library |
|
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:
-
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
-
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
-
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
-
(Optional) If required, pause or resume a media manager library or a tape backup job.
See Also:
-
View the status of all media manager libraries and tape backup operations to check for errors.
See Also:
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"
-
Oracle Secure Backup Administrator's Guide for more information about configuring media families
-
Oracle Secure Backup Administrator's Guide for more information on vaulting
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:
-
From the Cloud Control Home page, select Targets.
-
From the Targets Menu, select All Targets.
The All Targets page appears.
-
On the All Targets page, under the Refine Search Menu, select Databases as the Target Type.
-
Under the Databases section, select Oracle Secure Backup Domain.
A list of all Oracle Secure Backup Domains for all existing Recovery Appliance targets appears.
-
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. It contains the following topics:
Creating a Media Manager Library Using Cloud Control
A media manager library sets and manages the parameters for the media management software through which backups are copied to tape.
To create a media manager library:
-
Complete the steps in "Accessing the Recovery Appliance Home Page".
On the Recovery Appliance Home page, select Media Managers from the Recovery Appliance Menu.
Figure 7-1 displays the Media Managers screen with the default Oracle Secure Backup library and its corresponding attribute sets.
-
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.
-
In the Media Manager Library section, enter a name for this library.
-
In the Maximum Drives field, select the maximum number of tape drives that this media manager library can access.
-
Optionally, you can choose to enter Advanced Parameters for this media manager library.
-
In the Restore Drive advanced parameter field, specify the number of drives that you want to use solely for restore operations. If you do not enter any restore drive value, then the current restore operation uses the first free drive that is available once all the backup operations are complete.
-
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. -
-
To add the initial attribute set for this library, complete the steps in the section "Creating an Attribute Set Using Cloud Control".
If you do not enter any values for the attribute set, default values are applied.
-
Click OK.
Creating an SBT Library Using DBMS_RA
The SBT library object describes a media management software library installed on the Recovery Appliance. It includes parameters to pass to the media management software.
To create an SBT library:
-
With SQL*Plus or SQL Developer, connect to the Recovery Appliance metadata database as the Recovery Appliance administrator.
-
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. Theparms
argument has the same purpose and format as thePARMS
clause of an RMANALLOCATE
CHANNEL
command. It typically includes at least theSBT_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
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.
Recovery Appliance comes with Oracle Secure Backup preconfigured 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. It contains the following topics:
Creating an Attribute Set Using 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.
To create an attribute set:
-
Complete the steps in "Accessing Recovery Appliance in Cloud Control".
From the Recovery Appliance menu, select Media Managers.
-
Under the Attribute Sets section, click Create.
The Create Attribute Set box appears.
-
In the Name field, enter a name for this attribute set.
-
Optionally, in the Pool ID field, enter the media pool number that will be used to store backup copies.
-
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.
-
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.
-
Optionally, in the Media Management Vendor Commands field, enter vendor-specific commands for your media manager software to control your tape backup job.
-
Click OK.
Creating an SBT Attribute Set Using DBMS_RA
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.
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.
To create an SBT attribute set:
-
With SQL*Plus or SQL Developer, connect to the Recovery Appliance database as the Recovery Appliance administrator.
-
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 thePARMS
clause of an RMANALLOCATE
CHANNEL
command. In this case it designates thewholedb_mf
Oracle Secure Backup media family as the destination of the copy operation.
See Also:
-
"CREATE_SBT_ATTRIBUTE_SET" for descriptions of procedure arguments
-
"Backup Retention on Tape" for a discussion of the
sbt_retention_policy
argument
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:
See Also:
Managing a Media Manager Library Using Cloud Control
Editing a Media Manager Library
Edit the existing properties of a media manager library to update parameters based on your tape backup job requirements.
To edit a media manager library:
-
Complete the steps in "Accessing the Recovery Appliance Home Page".
On the Recovery Appliance Home page, select Media Managers from the Recovery Appliance menu.
-
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 7-2 Edit Media Manager Library Screen
Description of "Figure 7-2 Edit Media Manager Library Screen" -
Change the number of Maximum Drives.
Optionally, edit the Advanced Parameters by changing the number of Restore Drives and values in Media Management Vendor Parameters.
If you are using a third party media manager, then edit the required parameters for that specific media manager.
-
Click OK.
Deleting a Media Manager Library
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.
To delete a media manager library:
-
Complete the steps in "Accessing Recovery Appliance in Cloud Control".
-
From the Recovery Appliance Menu, select Media Managers.
-
From the list of existing media manager libraries, select the Media Manager Library you want to delete.
-
Click Delete.
A message asks you confirm the deletion of this library.
-
Click Yes.
Managing an SBT Library Using DBMS_RA
Editing an SBT Library
You can modify one or more attributes of an SBT library by calling the given procedure in the DBMS_RA
PL/SQL package.
To edit an SBT library:
-
Using SQL*Plus or SQL Developer, connect to the Recovery Appliance metadata database as the Recovery Appliance administrator.
-
Run the
UPDATE_SBT_LIBRARY
procedure, providing the name of the SBT library to modify and the new values for its attributes.Attributes omitted from the procedure call are left unchanged.
See Also:
Deleting an SBT Library
You can delete an SBT library by calling the given procedure in the DBMS_RA
PL/SQL package.
To delete an SBT library:
-
Using SQL*Plus or SQL Developer, connect to the Recovery Appliance metadata database as the Recovery Appliance administrator.
-
Run the
DELETE_SBT_LIBRARY
procedure, providing the name of the SBT object to delete.
Example 7-1 Deleting an SBT Library
BEGIN DBMS_RA.DELETE_SBT_LIBRARY( lib_name => 'OSBSBT'); END;
See Also:
Managing an Attribute Set Using Cloud Control
This section contains the following topics:
Editing 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.
To edit an attribute set:
-
Complete the steps "Accessing Recovery Appliance in Cloud Control".
-
From the Recovery Appliance Menu, select Media Managers.
-
From the list of attribute sets, select one attribute set that you need to edit.
-
Make the required changes to the Pool ID, Media Management Vendor Parameters, and Media Management Vendor Command values.
-
Click OK.
Deleting 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.
To delete an attribute set:
-
Complete the steps in "Accessing Recovery Appliance in Cloud Control".
-
From the Recovery Appliance Menu, select Media Managers.
-
In the Attribute Sets section, select the attribute list that you want to delete.
-
Click Delete.
A message asks you to confirm deletion of this attribute set.
-
Click Yes.
Managing an Attribute Set Using DBMS_RA
This section contains the following topics:
Editing an SBT 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.
To delete an SBT attribute set:
-
Using SQL*Plus or SQL Developer, connect to the Recovery Appliance database as the Recovery Appliance administrator.
-
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.
See Also:
Deleting an SBT Attribute Set
You can delete an SBT attribute set by calling the given procedure in the DBMS_RA
PL/SQL package.
To delete an SBT attribute set:
-
Using SQL*Plus or SQL Developer, connect to the Recovery Appliance database as the Recovery Appliance administrator.
-
Run the
DELETE_SBT_ATTRIBUTE_SET
procedure, providing the name of the SBT object to delete.
See Also:
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.
See Also:
-
"Creating a Media Manager Library" for more information on configuring media manager libraries
-
"Creating an Attribute Set" for more information on configuring attribute sets
You can create a tape backup job using Cloud Control or command-line options. This section contains the following topics:
Creating a Tape Backup Job Using Cloud Control
Cloud Control is the graphical user interface that you can use to create a tape backup job.
To create a tape backup job:
-
Complete the steps in "Accessing the Recovery Appliance Home Page"
-
On the Recovery Appliance Home page, from the Recovery Appliance menu, select Copy-To-Tape Job Templates.
The Copy-to-Tape Job Templates page appears.
-
Click Create to create a new tape backup job.
The Create Copy-to-Tape Job Template page appears as shown in Figure 7-3.
This page displays the job properties and schedule settings.
Figure 7-3 Recovery Appliance Create Copy-to-Tape Job Template Page
Description of "Figure 7-3 Recovery Appliance Create Copy-to-Tape Job Template Page" -
In the Name field, enter a name for the job.
-
Optionally, from the Media Manager Library drop-down list, select a media manager library that will manage this job.
-
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.
-
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.
-
-
In the Backup Type field, select the type of backup to be copied. Options include: Full backup, Incremental Backup, and Archived Log.
-
(Optional) In the Priority field, select the priority for this job. The default job priority is Medium.
-
In the Number of copies field, enter the number of copies you need for the backup being copied to tape. 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.
-
In the Runtime Window field, enter 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.
-
In the From Tag field, specify a tag name to only copy backups associated with a certain tag to tape.
-
Under the Schedule section, specify whether you want this job to run immediately or at a later specified time.
See Also:
-
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.
See Also:
-
"About Copying Backups to Tape with Recovery Appliance" for more information on tape backup operations
Example: Creating a Tape Backup Job Using 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.
This example uses Cloud Control to perform all tasks.
See Also:
To create an example tape backup scenario:
-
Create your first tape backup job and name this job
Test1
. -
Use the default media manager library
ROBOT0
and the attribute setDRIVE_COUNT_2
for this job.To edit the default media manager library values and default attribute set values, complete the steps in "Editing a Media Manager Library" and "Editing an Attribute Set", respectively.
-
Select the scope of this job as the Protection Policy
GOLD
. -
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. -
Schedule
Test1
to run on Sunday at 10:00 am and set it to repeat every 1 week. -
Similarly, create a second tape backup job and name this job
Test2
. -
Let this job use the same media manager library, protection policy and attribute set as
Test1
. -
Select Incremental from the Backup Type drop-down list for this job.
-
Schedule
Test2
to run from Monday to Saturday at 12:30 pm and set it to repeat daily. -
Using the same steps as above, create a third tape backup job and name it
Test3
. -
Select Archived Logs as the Backup Type for this job.
-
Schedule
Test3
to run at 6 hour intervals.
Figure 7-4 displays the Recovery Appliance Copy-to-Tape Templates screen after these jobs have been successfully submitted.
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.
Creating a Tape Backup Job Using 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.
To create an SBT job template:
-
With SQL*Plus or SQL Developer, connect to the Recovery Appliance database as the Recovery Appliance administrator.
-
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 thedb_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. -
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 adb_unique_name
is specified, then only backups for that database are considered for copying. -
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. -
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
, orFULL
. 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. -
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 is100 (SBT_PRIORITY_MEDIUM)
. -
See Also:
-
"About Copying Backups to Tape with Recovery Appliance" for more information on tape backup operations
-
"CREATE_SBT_JOB_TEMPLATE" for more information on procedure related arguments
-
"Scheduling Tape Backup Jobs with Oracle Scheduler" for more information on how to run an SBT job
Example: Creating a Tape Backup Job Using 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
This chapter contains the following topics:
Managing a Tape Backup Job Using Cloud Control
Editing a Tape Backup Job
After you have created a tape backup job, you can modify its properties using Cloud Control. If you have scheduled the job to run at a later time, then you can edit its parameters and schedule settings.
To edit a tape backup job:
-
Complete the steps in "Creating a Tape Backup Job Using Cloud Control".
-
Select the tape backup job that you want to edit.
-
Click Edit to change the existing job properties and schedule settings.
-
Make the required changes to the existing Media Manager Library, Attribute Set, Priority, Copies, Runtime Window, and From Tag values, to edit job properties.
-
Make changes the existing schedule options, to edit the job schedule settings.
See Also:
-
Click OK.
Deleting a Tape Backup Job
You can delete an existing tape backup job after the operation is complete and all required backups are copied to tape. If you delete an ongoing tape backup job, then the tape backup operation will stop copying selected backups to tape.
To delete a tape backup job:
-
Complete the steps in "Accessing the Recovery Appliance Home Page".
-
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.
-
From the list of jobs, select the job that you want to delete.
-
Click Delete.
A confirmation message appears asking whether you want to continue with deleting this job. Click Yes.
Managing a Tape Backup Job Using DBMS_RA
This section contains the following topics:
Editing an SBT Job
You can modify one or more attributes of an SBT job by calling the given procedure in the DBMS_RA
PL/SQL package.
To edit an SBT job:
-
Using SQL*Plus or SQL Developer, connect to the Recovery Appliance database as the Recovery Appliance administrator.
-
Run the
UPDATE_SBT_JOB_TEMPLATE
procedure, providing the name of the SBT job to modify and the new values for its attributes.
Example 7-2 Modifying an SBT Job
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;
See Also:
Deleting an SBT Job
You can delete a SBT job by calling the given DBMS_RA
PL/SQL package procedure.
To delete an SBT job:
-
Using SQL*Plus or SQL Developer, connect to the Recovery Appliance metadata database as the Recovery Appliance administrator.
-
Run the
DELETE_SBT_JOB_TEMPLATE
procedure, providing the name of the SBT job to delete.
See Also:
Scheduling a Tape Backup Job
This section contains the following topics:
Scheduling a Tape Backup Job Using Cloud Control
To schedule a tape backup job:
-
Complete the steps in "Accessing Recovery Appliance in Cloud Control".
-
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.
-
-
Click OK to save the job.
To edit the schedule settings, select the required tape backup job, click Edit, and make the necessary changes.
See Also:
"Creating a Tape Backup Job Using Cloud Control" for more information on tape backup job properties
Scheduling Tape Backup Jobs with Oracle Scheduler
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.
To schedule an SBT job with Oracle Scheduler:
-
With SQL*Plus or SQL Developer, connect to the Recovery Appliance database as the Recovery Appliance administrator.
-
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:
-
"Creating a Tape Backup Job Using DBMS_RA" to learn how to create an SBT job
-
See Oracle Database Administrator's Guide and Oracle Database PL/SQL Packages and Types Reference for information about Oracle Scheduler
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.
This section contains the following topics:
Pausing and Resuming Media Manager Library Operations Using Cloud Control
You can choose to pause media manager operations using Cloud Control, and then resume them when required.
This section contains the following topics:
Pausing a Media Manager Library
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.
To pause media manager library operations:
-
Complete the steps in "Accessing Recovery Appliance in Cloud Control".
-
From the Recovery Appliance Menu, select Media Managers.
-
From the list of media manager libraries, select the library for which you want to pause all ongoing jobs.
-
Click Pause.
Resuming a Media Manager Library
You can resume operations of any paused media manager library for the library and its associated job operations to continue.
See Also:
To resume media manager library operations:
-
Complete the steps in "Accessing Recovery Appliance in Cloud Control".
-
From the Recovery Appliance Menu, select Media Managers.
-
Select the paused media manager library for which you want to resume job operations.
-
Click Resume.
Pausing and Resuming the SBT Library Using DBMS_RA
This section contains the following topics:
Pausing an SBT Library
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:
-
Complete the steps "Accessing Recovery Appliance in Cloud Control".
-
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:
-
Complete the steps "Accessing Recovery Appliance in Cloud Control".
-
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
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:
-
With SQL*Plus or SQL Developer, connect to the Recovery Appliance metadata database as the Recovery Appliance administrator.
-
Run the following query:
SELECT LIB_NAME, LAST_ERROR_TEXT, STATUS FROM RA_SBT_LIBRARY; LIB_NAME LAST_ERROR_TEXT STATUS ------------------- ----------------------------------------------- ------ OSBSBT READY
Table 7-3 lists the possible values for
STATUS
.Table 7-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
. Thelast_error_text
column describes the most recent error returned by the media management library. The error text also appears in theRA_SBT_TASK
rows for the affected background SBT tasks.
See Also:
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:
-
With SQL*Plus or SQL Developer, connect to the Recovery Appliance metadata database as the Recovery Appliance administrator.
-
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
isKILLED
orABORTED
.
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:
-
With SQL*Plus or SQL Developer, connect to the Recovery Appliance metadata database as the Recovery Appliance administrator.
-
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:
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