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 9-4 Recovery Appliance Create Copy-to-Media Job Template Page

    Description of Figure 9-4 follows
    Description of "Figure 9-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 9-5 Tape Backup Jobs Example

Description of Figure 9-5 follows
Description of "Figure 9-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.