Skip to main content
SnapCenter Software 4.8
A newer release of this product is available.

Create backup policies for Oracle databases

Contributors netapp-soumikd

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

  • You must have defined your backup strategy.

  • You must have prepared for data protection by completing tasks such as installing SnapCenter, adding hosts, discovering databases, and creating storage system connections.

  • If you are replicating Snapshot copies to a mirror or vault secondary storage, the SnapCenter administrator must have assigned the SVMs to you for both the source and destination volumes.

  • If you have installed the plug-in as a non-root user, you should manually assign the execute permissions to the prescript and postscript directories.

Steps

  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 datafiles, control files, and archive log 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 having pluggable databases (PDBs), and want to save the state of the 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 either using the GUI or 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.
      Important If you are using Oracle Standard Edition, you can use LOG_ARCHIVE_DEST and LOG_ARCHIVE_DUPLEX_DEST parameters 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.

      prunning the backup policy

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

    SnapCenter allows you to use the predefined environment variables when you execute the prescript and postscript. Learn more

  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 Verification 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.