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 Exadata Cloud at Customer 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

  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 My Services Dashboard and 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 restoration and recovery process performs these steps:

    • Shut down the database

    • Prepare for recovery

    • Perform the recovery

    • Restart the database after recovery

Other Ways to Restore to a Specific Point in Time

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

You can use the bkup_api utility to restore and recover a complete database, or recover a specific pluggable database (PDB), to a specific point in time.

  1. Connect as the opc user to a compute node that is associated with the database deployment. In a Data Guard configuration, connect to the compute node hosting the primary database.

    For detailed instructions, see Connecting to a Compute Node Through Secure Shell (SSH).

  2. Start a root-user command shell:

    $ sudo -s
    #
  3. Enter the bkup_api command:

    • To recover to a specific Oracle Database system change number (SCN), enter the following bkup_api command:

      # /var/opt/oracle/bkup_api/bkup_api recover_start --scn scn --dbname=dbname
      

      where scn is the SCN of the desired recovery point, and dbname is the database name for the database that you want to recover.

    • To recover to a specific point in time, enter the following bkup_api command:

      # /var/opt/oracle/bkup_api/bkup_api recover_start -t 'timestamp' --dbname=dbname
      

      where timestamp is the recovery point in time expressed in the following format: DD-MON-YYY HH24:MM:SS, and dbname is the database name for the database that you want to recover.

      By default, the recovery point in time is subject to the UTC time zone. If you want to use the current database server OS time zone setting, then add the --nonutc command line argument as follows:

      # /var/opt/oracle/bkup_api/bkup_api recover_start -t 'timestamp' --nonutc --dbname=dbname
      

    Additionally:

    • If you want to recover a specific PDB to a specific point in time or SCN, then add the ––pdb=pdbname option, where pdbname is the PDB name.

      Note:

      • It is recommended to perform a complete database backup after every PDB recovery.

      • PDB recovery does not restore database files (control files, spfiles, data files and so on). Therefore, if a file is missing you must recover the entire database.

    • If you want to restore system and database configuration files included in the backup, then add the --cfgfiles option. Without this option, only the database is restored.

  4. After you enter a bkup_api recover_start command, the recovery process runs in the background. To check the progress of the recovery process, enter the following bkup_api command:

    # /var/opt/oracle/bkup_api/bkup_api recover_status --dbname=dbname
    
  5. Exit the root-user command shell and disconnect from the compute node:

    # exit
    $ exit