Backing up Oracle data

Use a backup job to back up Oracle environments with snapshots.

Before you begin

Review the following information:

  • To ensure that file system permissions are retained correctly when IBM Spectrum® Protect Plus moves Oracle data between servers, ensure that the user and group IDs of the Oracle users (for example, oracle, oinstall, dba) are consistent across all the servers. Refer to Oracle documentation for recommended uid and gid values.
  • If an Oracle Inventory job runs at the same time or short period after an Oracle backup job, copy errors might occur because of temporary mounts that are created during the backup job. As a best practice, schedule Oracle Inventory jobs so that they do not overlap with Oracle backup jobs.
  • Avoid configuring log backup for a single Oracle database by using multiple backup jobs. If a single Oracle database is added to multiple job definitions with log backup enabled, a log backup from one job could truncate a log before it is backed up by the next job. This might cause point-in-time restore jobs to fail.
  • Avoid scheduling log backups at the same time as an SLA backup job for the same Oracle database. If a log backup occurs at the same time as the backup task of an SLA backup, the SLA backup job may fail. Additionally, ad-hoc backups should not be started if they will run at the same time as scheduled log backups.
  • Point-in-time recovery is not supported when one or more data files are added to the database in the period between the chosen point-in-time and the time that the preceding backup job ran.

Take the following actions:

  • Before an IBM Spectrum Protect Plus user can implement backup and restore operations, roles and resource groups must be assigned to the user. Grant users access to resources and backup and restore operations through the Accounts pane. For more information, see Managing user access.
  • Register the providers that you want to back up. For more information, see Adding an Oracle application server.
  • Configure SLA policies. For more information, see Create backup policies.

About this task

During the initial base backup, IBM Spectrum Protect Plus creates a vSnap volume and an NFS share. During incremental backups, the previously created volume is reused. The IBM Spectrum Protect Plus agent mounts the share on the Oracle server where the backup is to be completed.

In the case of Oracle Real Application Clusters (RAC), the backup is completed from any one node in the cluster. When the backup job is completed, the IBM Spectrum Protect Plus agent unmounts the share from the Oracle server and creates a vSnap snapshot of the backup volume.

IBM Spectrum Protect Plus can protect multithreaded databases in Oracle 12c and later versions. For instructions about enabling IBM Spectrum Protect Plus to protect multithreaded databases, see Adding an Oracle application server.

Procedure

To define an Oracle backup job, complete the following steps:

  1. In the navigation panel, click Manage Protection > Databases > Oracle.
  2. Select Oracle homes, databases, and ASM diskgroups to back up. Use the search function to search for available instances.
  3. Click Select an SLA Policy to add one or more SLA policies that meet your backup data criteria to the job definition.
  4. To create the job definition by using default options, click Save.
    The job runs as defined by the SLA policies that you selected. To run the job manually, click Jobs and Operations > Schedule. Select the job and click Actions > Start.
    Tip: When the job for the selected SLA policy runs, all resources that are associated with that SLA policy are included in the backup operation. To back up only selected resources, you can run an on-demand job. An on-demand job runs the backup operation immediately.
    • To run an on-demand backup job for a single resource, select the resource and click Run. If the resource is not associated with an SLA policy, the Run button is not available.
    • To run an on-demand backup job for one or more resources, click Create job, select Ad hoc backup, and follow the instructions in Running an ad hoc backup job.
  5. To edit options before you create the job definition, click Select Options. Set the job definition options.
    Tips for configuring options:
    Review the following tips to help you configure options for the backup job:
    • To set the options for child resources to the same values as the parent, click Set all options to inherit.
    • If multiple resources were selected for the backup job, the options are indeterminate. If you change the value for an option, that value is used for all selected resources after you click Save.
    • Options that are shown in yellow indicate that the option value has changed from the previously saved value.
    • To close the Options pane without saving changes, click Select Options.

    Enable Log Backup

    Enable Log Backup must be selected to allow for Oracle point-in-time restore.

    Select Enable Log Backup to permit IBM Spectrum Protect Plus to automatically create a log backup volume and mount it to the application server. IBM Spectrum Protect Plus then automatically discovers the location of the existing primary archived log and uses cron to configure a scheduled job. The scheduled job completes a transaction log backup from the primary location to that log backup volume at the frequency specified through the Frequency setting.

    If an on-demand job runs with the Enable Log Backup option enabled, log backup occurs. However, when the job runs again on a schedule, the option is disabled for that job run to prevent possible missing segments in the chain of backups.

    The Frequency can be set to a value independent of the database backup frequency specified in the SLA Policy settings. For example, the SLA Policy may be configured to back up the database once per day while the log backup frequency could be set to once per 30 minutes.

    For Oracle RAC, IBM Spectrum Protect Plus mounts the volume and configures the cron job on each of the cluster nodes. When the schedule is triggered, the jobs internally coordinate to ensure that any one active node completes the log backup and the other nodes take no action.

    IBM Spectrum Protect Plus automatically manages the retention of logs in its own log backup volume based on the retention settings in the SLA policy.

    Choose an option for Truncate source logs after successful backup. Select Never, the default, if you do not want to truncate source logs after a successful backup job. If this option is selected, archived logs on the primary log destination are not deleted, and Database Administrators must continue to manage those logs using their existing log retention policies. Select Older than a specified number of days, Older than a specified number of hours, or Immediately after log backup if you do want source logs to be truncated after successful backup. Selecting one of these options will automatically delete older archived logs from the database’s primary archived log location after a number of days, hours or at the end of every successful database backup.

    When the option Truncate source logs after successful backup is set to Older than a specified number of days or Older than a specified number of hours, set the retention of primary logs by entering a day or hour value in the Primary log retention in days or Primary log retention in hours field. This setting controls the quantity of archived logs that are retained in the primary archived log locations. For example, if Older than a specified number of days is selected and Primary log retention in days is set to 3, IBM Spectrum Protect Plus deletes all archived logs older than three days from the primary archived log location at the end of every successful database backup.

    Note: Users that upgrade from a previous version of IBM Spectrum Protect Plus that did not select the Truncate source logs after successful backup will have that option set to Never after upgrading. Similarly, users that opted to select the Truncate source logs after successful backup option and entered a number of days for Primary log retention in days will have the option set for Older than a specified number of days and the associated number of days set in Primary log retention in days field after upgrading.

    Maximum Parallel Streams per Database

    Set the maximum data stream per database to the backup storage. This setting applies to each database in the job definition. Multiple databases can be backed up in parallel if the value of the option is set to 1. Multiple parallel streams might improve backup speed, but high bandwidth consumption might affect overall system performance.

  6. When you are satisfied that the job-specific information is correct, click Save.
  7. To configure additional options, click the Policy Options clipboard icon clipboard icon that is associated with the job in the SLA Policy Status section. Set the following additional policy options:

    Pre-scripts and Post-scripts

    Run a pre-script or a post-script. Pre-scripts and post-scripts are scripts that can be run before or after a job runs at the job level. Windows-based machines support Batch and PowerShell scripts while Linux®-based machines support shell scripts.

    In the Pre-script or Post-script section, select an uploaded script and an application or script server where the script will run. To select an application server where the script will run, clear the Use Script Server check box. Scripts and script servers are configured through the System Configuration > Script page.

    To continue running the job if the script associated with the job fails, select Continue job/task on script error.

    When this option is enabled, if a pre-script or post-script completes processing with a non-zero return code, the backup or restore operation is attempted and the pre-script task status is reported as COMPLETED. If a post-script completes with a non-zero return code, the post-script task status is reported as COMPLETED.

    When this option is disabled, the backup or restore is not attempted, and the pre-script or post-script task status is reported as FAILED.

    Exclude Resources

    Exclude specific resources from the backup job through single or multiple exclusion patterns. Resources can be excluded through an exact match or with wildcard asterisks specified before the pattern (*test) or after the pattern (test*).

    Multiple asterisk wildcards are also supported in a single pattern. Patterns support standard alphanumeric characters as well as the following special characters: - _ and *.

    Separate multiple filters with a semicolon.

    Force Full Backup of Resources

    Force base backup operations for specific virtual machines or databases in the backup job definition. Separate multiple resources with a semicolon.

What to do next

After you create the backup job definition, complete the following action:
Action How to
Create an Oracle Restore job definition. See Restoring Oracle data.