Restoring to a Specific Point in Time

You can restore from a backup and perform recovery to a specific point in time on an Oracle Database Cloud Service database deployment by using the Oracle Database Cloud Service console or, if desired, by using one of the ways listed in Other Ways to Restore to a Specific Point in Time at the end of this topic.

Restoring to a Specific Point in Time by Using the Oracle Database Cloud Service Console

Note:

Currently, using the console to restore to a specific point in time is not supported for database deployments hosting an Oracle Data Guard configuration.

  1. Go to the Backup page of the deployment you want to restore and recover:

    1. Open the Oracle Database Cloud Service console.

      For detailed instructions, see Accessing the Oracle Database Cloud Service Console.

    2. Click the database deployment you want to restore and recover.

      The Oracle Database Cloud Service Overview page is displayed.

    3. Click the Administration tile.

      The Oracle Database Cloud Service Backup page is displayed.

  2. Click Recover.

    The Database Recovery overlay is displayed.

  3. In the list of recovery options, select Date and Time or System Change Number (SCN) to indicate how you want to specify the end point of the recovery operation. Then, enter the appropriate value.

    Note:

    If specified, the recovery date and time values are subject to the UTC time zone.
  4. Click Recover.

    The restore and recover process performs these steps:

    • Shuts down the database

    • Extracts and restores configuration files

    • Prepares for recovery

    • Performs the recovery

    • Restarts the database after recovery

Other Ways to Restore to a Specific Point in Time

Restoring to a Specific Point in Time by Using the dbaascli Utility

Note:

Beginning in version 18.4.6, the default behavior of the dbaascli orec subcommand changed. The command now downloads only the backup data. Use the new -cfgfiles option to also download the configuration files.

You can use the dbaascli utility to restore from a backup and perform recovery to a specific point in time on a database deployment hosting a single-instance database or a Data Guard configuration.

  1. Connect as the opc user to the compute node. In a Data Guard configuration, connect to the compute node hosting the primary database.
  2. Start a root-user command shell:
    $ sudo -s
    #
  3. Restore the most recent backup and perform complete recovery using the orec subcommand of the dbaascli utility:
    # dbaascli orec --args -scn SCN
    

    where SCN is the system change number (SCN) for the end point of the recovery.

    The restore and recover process performs these steps:

    • Shuts down the database

    • Extracts and restores configuration files

    • Prepares for recovery

    • Performs the recovery

    • Restarts the database instance after recovery

    In a Data Guard configuration, after the restore and recovery operation is complete, a message indicating that you need to run the duplicate command on the standby instance is displayed. Perform all of the following steps to complete the operation on the standby database. In a single-instance database you only need to perform the next step.

  4. Exit the root-user command shell and disconnect from the compute node:
    # exit
    $ exit
  5. In the Data Guard configuration, connect to the standby instance's compute node as the opc user.
  6. Start a root-user command shell:
    $ sudo -s
    #
  7. Run the duplicate option of orec.
    # dbaascli orec --args -duplicate
    
  8. Exit the root-user command shell and disconnect from the compute node:
    # exit
    $ exit

Restoring to a Specific Point in Time by Using the raccli Utility

Not Oracle Cloud InfrastructureNot Oracle Cloud at Customer This topic does not apply to Oracle Cloud Infrastructure or to Oracle Cloud at Customer.

You can use the raccli utility to restore from a backup and perform recovery to a specific point in time on a database deployment hosting an Oracle Real Application Clusters (RAC) database:

  1. Connect as the opc user to the compute node.
  2. Perform recovery to a specific point in time using the create recovery subcommand of the raccli utility:
    $ raccli create recovery -pitr -scn SCN
    

    or

    $ raccli create recovery -pitr -timestamp time
    

    where SCN is the system change number (SCN) for the end point of the recovery and time is time (in the format MM/DD/YYYY HH24:MI:SS) for the end point of the recovery.

    The restore and recover process performs these steps:

    • Shuts down the database

    • Extracts and restores configuration files

    • Prepares for recovery

    • Performs the recovery

    • Restarts the database instances after recovery