Creating backup policies for Oracle databases

Before you use SnapCenter to back up Oracle database resources, you must create a backup policy for the resource or the resource group that you want to back up. A backup policy is a set of rules that governs how you manage, schedule, and retain backups. You can also specify the replication, script, and backup type settings. Creating a policy saves time when you want to reuse the policy on another resource or resource group.

Before you begin

Procedure

  1. In the left navigation pane, click Settings.
  2. In the Settings page, click Policies.
  3. Select Oracle Database from the drop-down list.
  4. Click New.
  5. In the Name page, enter the policy name and description.
  6. In the Backup Type page, perform the following steps:
    • If you want to create an online backup, select Online backup.

      You must specify whether you want to back up all the database files, only datafiles and control files, or only archive log files.

    • If you want to create an offline backup, select Offline backup, and then select one of the following options:
      • If you want to create an offline backup when the database is in mounted state, select Mount.
      • If you want to create an offline shutdown backup by changing the database to shutdown state, select Shutdown.

        If you are using Oracle 12c database, and want to save the state of the pluggable databases (PDBs) before creating the backup, you must select Save state of PDBs. This enables you to bring the PDBs to their original state after the backup is created.

    • Specify the schedule frequency by selecting On demand, Hourly, Daily, Weekly, or Monthly.
      Note: You can specify the schedule (start date and end date) for the backup operation while creating a resource group. This enables you to create resource groups that share the same policy and backup frequency, but enables you to assign different backup schedules to each policy.
      Note: If you have scheduled for 2:00 a.m., the schedule will not be triggered during daylight saving time (DST).
    • If you want to catalog backup using Oracle Recovery Manager (RMAN), select Catalog backup with Oracle Recovery Manager (RMAN).

      You can perform deferred cataloging for one backup at a time only by using the SnapCenter CLI command Catalog-SmBackupWithOracleRMAN.

      Note: If you want to catalog backups of a RAC database, ensure that no other job is running for that database. If another job is running, the cataloging operation fails instead of getting queued.
    • If you want to prune archive logs after backup, select Prune archive logs after backup.
      Note: Pruning of archive logs from the archive log destination that is unconfigured in the database, will be skipped.
    • If you are using Oracle Standard Edition, you can use the following parameters:
      • LOG_ARCHIVE_DEST
      • LOG_ARCHIVE_DUPLEX_DEST while performing archive log backup
    • You can delete archive logs only if you have selected the archive log files as part of your backup.
      Note: You must ensure that all the nodes in an RAC environment can access all the archive log locations for the delete operation to be successful.
      If you want to... Then...
      Delete all archive logs Select Delete all archive logs.
      Delete archive logs that are older Select Delete archive logs older than, and then specify the age of the archive logs that are to be deleted in days and hours.
      Delete archive logs from all destinations Select Delete archive logs from all the destinations.
      Delete the archive logs from the log destinations that are part of the backup Select Delete archive logs from the destinations which are part of backup.


  7. In the Retention page, specify the retention settings for the backup type and the schedule type selected in the Backup Type page:
    If you want to... Then...
    Keep a certain number of Snapshot copies Select Total Snapshot copies to keep, and then specify the number of Snapshot copies that you want to keep.

    If the number of Snapshot copies exceeds the specified number, the Snapshot copies are deleted with the oldest copies deleted first.

    Note: The maximum retention value is 1018 for resources on ONTAP 9.4 or later, and 254 for resources on ONTAP 9.3 or earlier. Backups will fail if retention is set to a value higher than what the underlying ONTAP version supports.
    Important: You must set the retention count to 2 or higher if you plan to enable SnapVault replication. If you set the retention count to 1, the retention operation might fail because the first Snapshot copy is the reference Snapshot copy for the SnapVault relationship until a newer Snapshot copy is replicated to the target.
    Keep the Snapshot copies for a certain number of days Select Keep Snapshot copies for, and then specify the number of days for which you want to keep the Snapshot copies before deleting them.
    Note: You can retain archive log backups only if you have selected the archive log files as part of your backup.
  8. In the Replication page, specify the replication settings:
    For this field... Do this...
    Update SnapMirror after creating a local Snapshot copy Select this field to create mirror copies of the backup sets on another volume (SnapMirror replication).
    Update SnapVault after creating a local Snapshot copy Select this option to perform disk-to-disk backup replication (SnapVault backups).
    Secondary policy label Select a Snapshot label.
    Depending on the Snapshot copy label that you select,ONTAP applies the secondary Snapshot copy retention policy that matches the label.
    Note: If you have selected Update SnapMirror after creating a local Snapshot copy, you can optionally specify the secondary policy label. However, if you have selected Update SnapVault after creating a local Snapshot copy, you should specify the secondary policy label.
    Error retry count Enter the maximum number of replication attempts that can be allowed before the operation stops.
    Note: You should configure SnapMirror retention policy in ONTAP for the secondary storage to avoid reaching the maximum limit of Snapshot copies on the secondary storage.
  9. Optional: In the Script page, enter the path and the arguments of the prescript or postscript that you want to run before or after the backup operation, respectively.
    You must store the prescripts and postscripts either in /var/opt/snapcenter/spl/scripts or in any folder inside this path. By default, the /var/opt/snapcenter/spl/scripts path is populated. If you have created any folders inside this path to store the scripts, you must specify those folders in the path.

    You can also specify the script timeout value. The default value is 60 seconds.

  10. In the Verification page, perform the following steps:
    1. Select the backup schedule for which you want to perform the verification operation.
    2. In the Verfication script commands section, enter the path and the arguments of the prescript or postscript that you want to run before or after the verification operation, respectively.
      You must store the prescripts and postscripts either in /var/opt/snapcenter/spl/scripts or in any folder inside this path. By default, the /var/opt/snapcenter/spl/scripts path is populated. If you have created any folders inside this path to store the scripts, you must specify those folders in the path.

      You can also specify the script timeout value. The default value is 60 seconds.

  11. Review the summary, and then click Finish.