Back up an Oracle database

Updated at:

To protect your Oracle database from data loss, we recommend regularly backing up the database with Cloud Backup. Cloud Backup lets you back up Oracle databases on ECS instances or on-premises servers to the cloud. You can restore a database to its original location or to another ECS instance or on-premises server in the same region from a specific point-in-time backup. This topic describes how to back up an Oracle database.

Prerequisites

  • You have activated the Alibaba Cloud Cloud Backup service. Activating Cloud Backup is free of charge, but using the database backup feature of Cloud Backup incurs the following fees:

    • Database backup vault rental fee. For each Alibaba Cloud account, the first 30 days are free and include 100 GB of free capacity per backup vault per month.

    • Database backup storage fee. You are charged for the storage space that is consumed after deduplication and compression. The first 30 days are free. After the free trial period ends, tiered pricing is used.

    For more information about pricing, see Pricing Details.

  • You have registered your Oracle database in the Cloud Backup console.

  • For an Oracle database on an ECS instance, we recommend that you run a precheck to identify potential issues. The precheck includes checks for OSS connectivity, management network connectivity, Oracle instance status, Oracle database status, and ARCHIVELOG mode. For more information, see Precheck an Oracle database hosted on an ECS instance.

Usage notes

  • The network of the on-premises database server must be connected to an Alibaba Cloud Virtual Private Cloud (VPC). The server must also be able to communicate with the service CIDR blocks of Alibaba Cloud (100.64.0.0/10, 100.64.0.0/11, or 100.96.0.0/11) through an Express Connect circuit or a VPN gateway. For more information, see Establish a connection between a VPC and an on-premises data center (single-tunnel mode).

  • The supported database versions, operating systems, and backup features are limited. For more information, see Compatibility and limits.

  • You cannot back up an Oracle database if the anti-ransomware service is enabled for the database. For more information about the anti-ransomware service, see Anti-ransomware service overview.

  • The Oracle backup feature does not support the backup of databases that run in containers.

  • Cloud Backup periodically deletes expired backup data. Cloud Backup does not support backing up an Oracle database concurrently with third-party backup software, including script tools. Otherwise, Cloud Backup may mistakenly delete data backed up by other software by calling the RMAN command.

  • When you create a backup plan, select a proper backup vault. We recommend that you do not back up data from the same database instance to different backup vaults. Otherwise, incremental or log backups may be converted to full backups, which consumes extra storage space in the backup vault.

  • If you use other backup software or scripts to perform a full backup or an incremental backup, the next Cloud Backup incremental backup may be converted to a full backup. This incurs additional backup storage costs. Log backups are not affected.

Procedure

Important

Incremental backups and log backups depend on a valid full backup to form a complete recovery chain. To ensure that your backup plan can take effect immediately and your data is recoverable, perform a full backup manually immediately after creating the backup plan. This establishes a reliable baseline for future backups.

After registering an Oracle instance, you must create a backup plan for it. Cloud Backup runs backup jobs based on the specified schedule. Follow these steps to create a backup plan:

  1. Log on to the Cloud Backup console.

  2. In the left-side navigation pane, choose Backup > Database Backup. Select a region and then click the Oracle tab. Click the ECS Database Instance or Local Database Instance tab. Find the target Oracle instance and click Back Up in the Actions column.

  3. In the Create Backup Plan panel, configure the following parameters.

    1. Configure the backup content and click Next.

      1. Enter a name for the Plan Name parameter.

      2. Select the database instance that you want to back up.

    2. Configure the backup plan and click Next.

      Parameter

      Description

      Recommended Plan

      Specifies a recommended backup policy. Cloud Backup provides the following predefined backup policies. You can select a predefined policy or customize your own.

      • Typical Plan: enables the Full Backup and Incremental Backup features.

      • Critical Application: enables the Full Backup, Incremental Backup, and Log Backup features.

      • Customize: specifies a custom backup type. You can select incremental backup or real-time backup and configure parameters such as the start time and backup interval.

      Full Backup

      Performs a full backup of all database files on the operating system. When you restore data from a full backup, you can restore data only to the point in time at which the backup was created.

      You can run the backup once immediately or at a specified time, or schedule periodic backups by hour, day, week, or month.

      Incremental Backup

      Backs up only the database files that have changed since the last backup. When you restore data from an incremental backup, you can restore data only to the point in time at which the backup was created.

      You can run the backup once immediately or at a specified time, or schedule periodic backups by hour, day, week, or month.

      Important

      Incremental backups depend on the most recent full backup for data recovery. Therefore, the corresponding full backup is retained until the incremental backup expires. We recommend that you specify a proper backup cycle and retention period. For more information, see How are expired backups in a database backup vault cleared?.

      Log Backup

      Backs up database logs. You can schedule log backups at a fixed interval.

      You can run the backup once immediately or at a specified time, or schedule periodic backups by hour, day, week, or month.

      Important

      Log backups depend on the most recent full backup for data recovery. Therefore, the corresponding full backup is retained until the log backup expires. We recommend that you specify a proper backup cycle and retention period. For more information, see How are expired backups in a database backup vault cleared?.

      Realtime Backup

      Backs up database log data in real time.

      Before you enable real-time backup, you must perform a full backup. After real-time backup is enabled, database log data is continuously backed up. This helps you achieve a recovery point objective (RPO) of seconds. Real-time backup is free of charge during the free trial period. After the free trial period ends, Cloud Backup immediately charges you for the storage that is consumed by real-time backups. For more information, see Pricing.

      Important

      For a single Oracle database instance, you can create only one backup plan that includes real-time backup.

    3. Configure backup options and click Next.

      Parameter

      Description

      Concurrent Threads

      The number of concurrent threads for data backup.

      Retry Time

      The interval at which the system retries to connect to the database after the database disconnects during a backup. Unit: minutes.

      Speed Limit

      The maximum rate at which data is backed up. Unit: MB/s. A value of 0 means the backup speed is unlimited.

      If Keep Archive Logs

      The retention policy for backed-up archive logs. By default, logs are retained for 24 hours.

      • Do Not Keep: Deletes all backed-up archive logs after the backup is complete.

      • Keep All: Retains all archive logs. The logs are not deleted.

      • Keep: Deletes logs a specified number of hours after they are backed up.

    4. Configure the backup vault and click Create.

      Important

      An instance can be backed up only to a single backup vault. You cannot back up an instance to multiple backup vaults.

      Parameter

      Description

      Backup Vault

      Specifies the backup vault where backups are stored.

      • Create Vault: Enter a name for the new backup vault. This parameter is optional. If you leave this parameter empty, a random name is assigned.

      • Select Vault: Select an existing backup vault from the drop-down list.

      Important

      After a backup vault is created, you are charged a rental fee for the database backup vault regardless of whether backup data is generated. For more information, see Billing methods and billable items.

      The system automatically selects a redundancy type based on regional support. In regions that support zone redundancy, a zone-redundant archive vault is created by default. In other regions, a locally-redundant archive vault is created. You do not need to select the redundancy type.

      Vault Name

      The name of the backup vault.

      Backup Retention Period

      The length of time to retain backups. Valid units are Day, Week, Month, and Year.

      You can change the backup retention period on the vault management page. The new retention period applies to all new backup data in the backup vault.

      Important

      Incremental backups and log backups depend on the most recent full backup for data recovery. Therefore, the corresponding full backup is retained until the incremental and log backups expire. We recommend that you specify a proper backup cycle and retention period. For more information, see How are expired backups in a database backup vault cleared?.

Verify backup results

  • After the backup plan is created, you can view its details on the Backup Plans tab. The details include the next run time and backup interval for Full Backup, Incremental Backup, and Log Backup. Cloud Backup runs Oracle database backup jobs based on the specified start time and backup interval.

  • At the scheduled time, Cloud Backup starts to run the backup plan. The current backup job is complete when the Status changes to Idle and a time is displayed in the Next Run column.

The backup plan details page also displays the Backup Content such as oracle://orcl and oracle://orcl/archivelog, Backup Options such as concurrent threads, retry time, speed limit, and archive log retention period, and the name and ID of the associated backup vault.

Troubleshooting

If a restore job for a standby Oracle Data Guard database fails, the failure may be due to using password-free logon during instance activation. You can find the target database, click in the Actions column, and then select Reactivate. Reactivate the instance by using the database username and password, and then retry the job.

FAQ

More operations

On the Backup Plan tab, you can perform the following operations in the Actions column for a backup plan.

  • Edit a backup plan

    Click Edit to modify the backup plan.

  • Configure alert settings

    Click in the Actions column and select Alert Settings. Then, select a backup alert method.

    Backup alert method

    Description

    Disabled

    The client no longer sends alert notifications.

    Same as Backup Vault

    The client uses the same alert method as the backup vault.

    Notify Alibaba Cloud Account

    Sends alert notifications by email to the Alibaba Cloud account.

    Custom

    Select one or more contacts or contact groups. After the configuration is complete, the client sends backup alerts to the selected contacts or contact groups.

  • Delete a backup plan

    Deleting a backup plan interrupts any running backup and restore jobs.

    Click in the Actions column and select Delete Backup to delete a backup plan that is no longer needed.

Next steps

Restore an Oracle database

Related documents