Creating a Protection Policy

This section explains how to create a protection policy using either Cloud Control (recommended) or the DBMS_RA.CREATE_PROTECTION_POLICY procedure. The best practice is to create a separate protection policy for each tier of databases (see "Task 1: Group protected databases into tiers").

You must be logged in to the Recovery Appliance as RASYS or as a named db_user with user_type=admin.

To create a Protection Policy with Cloud Control:

  1. From any Cloud Control page, select Targets, and then Recovery Appliances.

    The Recovery Appliances page appears.

  2. From the Recovery Appliances drop-down menu, select Protection Policies.

    The Protection Policies page has two areas. The upper table lists the protection policies available, and has controls for Create, Edit, and Delete.

    When a policy is highlighted in the upper table, the lower table lists the protected databases that use that particular policy.

  3. Click Create.

    The Create Protection Policy page appears.

    Figure 7-4 Create Protection Policy Page

    Description of Figure 7-4 follows
    Description of "Figure 7-4 Create Protection Policy Page"

    In this page, the default Recovery Appliance storage location DELTA is already selected.

  4. Enter values as follows:

    • In the Name field, enter the name of the new protection policy.

      For example, enter bronze_dev.

    • In the Description field, enter a description for the new policy.

      For example enter, Policy with disk recovery window of 3 days and no tape backup.

    • In the Recovery Window field of the Disk Recovery Window Goal section, specify a recovery window goal that the Recovery Appliance should attempt to meet for point-in-time recovery using disk backups, and then select the units.

      For example, enter 3 and then select days.

    • If the protection policy is being configured for regulatory operation, specify the Recovery Window Compliance. This setting specifies a time range for each database backup in which backups will not be deleted. This value must be equal to or smaller than recovery_window_goal. Too large a value can result in filling disk_reserved_space with compliance protected backups, whereby new backups are then rejected.

    • In the Threshold field of the Unprotected Data Window Threshold section, enter the maximum tolerable interval for data loss.

      For example, enter 5 and then select minutes.

    • If the protection policy is being configured for compliance operation, Keep Compliance specifies that backups are held until their "keep until time".

    • The Autotuned Reserved Space specifies whether or not the Recovery Appliance will automatically define and / or update the reserved_space for databases associated with this policy.

      For compliance backups, reserved_space is a hard limit allocated for a given database, so autotune_reserved_space does not apply.

    • In the Recovery Window field of the Media Manager Recovery Window Policy section, optionally specify a larger window within which point-in-time recovery from a media manager will be maintained.

      For example, if no tape backup is desired, then leave this field blank.

    • In the Maximum Retention field of the Maximum Disk Backup Retention section, enter the maximum time that the Recovery Appliance must retain disk backups. This should be greater than or equal to the recovery window goal.

      For example, if not specified, backups are retained beyond the disk recovery goal as space permits.

  5. Optionally, you can change items in the Advanced section.

    • In the Backup and Redo Failover section, specify whether protection databases associated with this protection policy are using this Recovery Appliance as an alternate destination.

    • If not using Recovery Window Compliance or Keep Compliance, then optionally the Backup Deletion section specifies if the Recovery Appliance allows backup deletion with RMAN DELETE (administrator role).

    • In the Backup Polling Location section, define a backup polling policy.

      • In the Location field, specify a directory accessible by the Recovery Appliance.

      • In the Frequency field, specify a time interval, and then select the time units.

      For example, to specify that backup polling is disabled, leave the fields blank.

    • In the Backup Copy Policy section, specify whether the Recovery Appliance must replicate backups or copy backups to tape before deleting them.

      For example, select Always accept new backups even if it requires purging existing backups not yet copied to tape or replicated.

    • In the Archived Log Backup Compression, you can select the compression algorithm for archived log backups.

  6. Click OK.

    A deployment procedure is submitted to create the protection policy. A confirmation message to this effect is displayed at the top of the protection policies page. After the Protection Policies pages is refreshed, the newly created policy appears in the list.

See Also:

To create a Protection Policy with PL/SQL:

Assume that you want to create a protection policy named bronze_dev for a tier of databases in a development environment. You have the following requirements for all databases protected by this policy:

  • The disk recovery window goal is 3 days, which means that every database must be recoverable using disk backups to any time within the last 3 days, starting from the current time.

  • You do not want to archive backups to tape.

  • You want the Recovery Appliance to receive new backups even if old backups must be deleted because available storage space is low.

  • No backup polling policy is enabled.

You also want to create policies for gold_dev, with a disk recovery window goal of 35 days, and silver_dev, with a disk recovery window goal of 10 days. Additionally, you create one policy named bronze_dev with a disk recovery window goal of 12 hours.

  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_PROTECTION_POLICY procedure.

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

    BEGIN
     DBMS_RA.CREATE_PROTECTION_POLICY (
      protection_policy_name => 'bronze_dev',
      description            => 'For protected dbs in bronze tier',
      storage_location_name  => 'delta',
      recovery_window_goal   => INTERVAL '3' DAY,
      guaranteed_copy        => 'NO');
     DBMS_RA.CREATE_PROTECTION_POLICY (
      protection_policy_name => 'silver_dev',
      description            => 'For protected dbs in silver tier',
      storage_location_name  => 'delta',
      recovery_window_goal   => INTERVAL '10' DAY,
      guaranteed_copy        => 'NO');
     DBMS_RA.CREATE_PROTECTION_POLICY (
      protection_policy_name => 'gold_dev',
      description            => 'For protected dbs in gold tier',
      storage_location_name  => 'delta',
      recovery_window_goal   => INTERVAL '35' DAY,
      guaranteed_copy        => 'NO');
     DBMS_RA.CREATE_PROTECTION_POLICY (
      protection_policy_name => 'test_dev',
      description            => 'Test policy',
      storage_location_name  => 'delta',
      recovery_window_goal   => INTERVAL '12' HOUR,
      guaranteed_copy        => 'NO');
    END;
    

    Note:

    Pay attention to the attributes that are mutually exclusive, such as the parameters associated with compliance versus the parameters of back up deletion or autotuning reserved space.
  3. Optionally, query the recovery catalog to confirm creation of the policy.

    For example, query RA_PROTECTION_POLICY as follows (sample output included):

    COL POLICY_NAME FORMAT a11
    COL DESCRIPTION FORMAT a36
    SELECT POLICY_NAME, DESCRIPTION, 
           TO_CHAR(EXTRACT(DAY FROM RECOVERY_WINDOW_GOAL),'fm00')||':'||
           TO_CHAR(EXTRACT(HOUR FROM RECOVERY_WINDOW_GOAL),'fm00')||':'||
           TO_CHAR(EXTRACT(MINUTE FROM RECOVERY_WINDOW_GOAL),'fm00')||':'||
           TO_CHAR(EXTRACT(SECOND FROM RECOVERY_WINDOW_GOAL),'fm00')
             AS "DD:HH:MM:SS"
    FROM   RA_PROTECTION_POLICY
    WHERE  POLICY_NAME LIKE '%DEV'
    ORDER BY POLICY_NAME;
    
    POLICY_NAME DESCRIPTION                          DD:HH:MM:SS
    ----------- ------------------------------------ ---------------
    BRONZE_DEV  For protected dbs in bronze_dev tier 03:00:00:00
    GOLD_DEV    For protected dbs in gold_dev tier   35:00:00:00
    SILVER_DEV  For protected dbs in silver_dev tier 10:00:00:00
    TEST_DEV    Test policy                          00:12:00:00