All Products
Search
Document Center

Restore an Oracle database

Last Updated: Aug 20, 2020

Database Backup (DBS) allows you to restore terabytes of data within 10 seconds based on technologies such as database physical backup and snapshot mounting. It can provide read and write capabilities and meet the requirements for data restoration after misoperation, recovery rehearsals, emergency disaster recovery, DevOps, and data analytics. This topic describes how to restore an Oracle database in seconds.

Prerequisites

  • An Oracle database is backed up by using DBS. For more information, see Use DBS to back up an Oracle instance. When the Oracle database was backed up, the Backup Storage Type parameter was set to DBS built-in storage. For more information, see Built-in storage and OSS.

  • When the Oracle database was backed up, the Backup set mode parameter was set to Mount backup in seconds. For more information, see Set the backup set mode to Mount backup in seconds.

  • The FUSE module is installed on the server where the destination database resides.

  • The destination database is a user-created database that is hosted on an Elastic Compute Service (ECS) instance.

    The ECS instance resides in a virtual private cloud (VPC). For information about how to create a VPC, see Create a default VPC and VSwitch.

Usage notes

You can switch between the two backup set modes that are supported by DBS. After you switch the backup set mode, DBS automatically creates a full backup task and an incremental backup task, and a gap occurs in the time range available for restoring backup sets. We recommend that you do not change the backup set mode frequently.

Set the backup set mode to Mount backup in seconds

DBS supports two backup set modes for backing up an Oracle database:

  • Non-intrusive streaming backup: uses the Oracle System Backup to Tape (SBT) interface to back up data. Backed up data is stored as backup sets on a virtual tape before the data is streamed to the cloud. This method uses less storage space and does not have a negative impact on the source database.
  • Mount backup in seconds: uses mount points to back up data. This method has a negative impact on the destination environment. Make sure that the FUSE module is installed on the server where the destination database resides. If the Oracle database you want to restore was backed up by using the Mount backup in seconds mode, you can skip this step.

If the Oracle database you want to restore was backed up by using the Non-intrusive streaming backup mode, perform the following steps to switch the backup set mode to Mount backup in seconds:

  1. Log on to the DBS console.
  2. In the left-side navigation pane, click Backup Schedules.
  3. On the Backup Schedules page, find the target backup schedule and click Manage in the Actions column.
  4. On the Configure Task page, click Backup Time and Advanced Settings in the upper-right corner of the Basic Information section.
  5. On the Edit Backup Source page, set Backup set mode to Mount backup in seconds and click Save.
    Edit Backup source Oracle

Enable second-level restoration

  1. Log on to the DBS console.
  2. In the left-side navigation pane, click Backup Schedules.
  3. On the Backup Schedules page, find the target backup schedule and click Manage in the Actions column.
  4. On the Configure Task page, click Set up second level recovery in the upper-right corner of the Task Running Information section.
  5. In the Set up second level recovery dialog box, set Second level recovery to Enable and click OK.
    set up second level

    After you enable second-level restoration, the value of the Second recovery time range parameter is Data preparing. Wait until the value changes to a time range available for restoring backup sets.

Start a second-level restore task

  1. Log on to the DBS console.
  2. In the left-side navigation pane, click Backup Schedules.
  3. On the Backup Schedules page, find the target backup schedule and click Manage in the Actions column.
  4. On the Configure Task page, click Second level recovery database in the upper-right corner.
  5. On the Create second level recovery task page, set the parameters as described in the following table.

    Section Parameter Description
    None Task Name The name of the second-level restore task. DBS automatically generates a task name. We recommend that you set an informative name for easy identification. You do not need to use a unique task name.
    Set Time Restored To Time Range Available to Restore The time range available for restoring backup sets. DBS displays the available time range automatically.
    Restore To The time point that you want to restore the source database to. The value must be within the time range that is specified by the Time Range Available to Restore parameter.
    Second level recovery information settings Instance Region The region where the database to be restored resides.
    Peer VPCThe ID of the VPC where the backup gateway for restoring data resides.
    Peer VSwitchThe VSwitch where the backup gateway for restoring data resides.
    Backup GatewayThe backup gateway that is installed for restoring data. For more information about how to install a backup gateway, see Add a backup gateway.
    To avoid restoring a database to the production environment, you cannot restore data to the same sever where data is backed up. Therefore, you cannot install the backup gateway for restoring data on the same server where the backup gateway for backing up data is installed.
    AddressThe endpoint used to connect to the database to be restored. The default value is localhost.
    Port NumberThe port used to connect to the database to be restored. The default value is 1521.
    SIDThe SID of the database to be restored.
    Database program directoryThe program directory of the restored database. In this example, set this parameter to the absolute path that is specified by the ORACLE_HOME variable.
  6. Click Recover immediately.

    To view the task ID and task running information about the second-level restore task you created, click Second level recovery task in the left-side navigation pane.