Skip to main content

How can we help you?

Druva Documentation

About restore of Oracle Databases

Phoenix Editions: File:/tick.png Business File:/cross.png Enterprise File:/tick.png Elite

 

After you back up your databases using Druva, you can restore them to a consistent state either to the same server or to an alternate location. For more information about restoring a database to an alternate server, see Restore database to an alternate server.

You can restore databases either from snapshots or to a point-in-time.

Before you restore databases, ensure that you read the restore checklist.

Oracle server database restore checklist

  • Druva allows you to restore a complete database automatically. Druva also enables DBAs to manually recover individual database elements, such as data files, control files, system parameter files, archive logs, wallet files, and metadata.
  • RMAN uses different formats for restore from disk and SBT. So, make sure you use the same format to manually restore the database as the one used while creating the backupsets. For example, if you have created the backupsets by using SBT, then do not catalog the backupsets on disk , else RMAN will throw an error. Also, while manually restoring the database,  make sure you restore using SBT only, and not the disk format, else the restore operation will fail.
  • When you restore from a snapshot back to the original database, Druva overwrites all the existing content of the database.
  • Any updates made to the database after the last snapshot was created are lost.
  • If you have specified a TNS alias for database authentication, Druva requires you to register static service to ensure successful automated recovery.

Restore workflow

Restore and recover a complete database

Druva allows you to restore a complete database automatically. The original database on the Oracle server host is replaced with the restored data.

Restore individual database elements

Two personas are involved in restoring a database that was backed up using Druva:

  • Druva administrator: The Druva administrator runs a restore job on the Management Console. After the restore job completes, the requested snapshot is downloaded as backup data at the specified restore location on the local Oracle server host. You must set the restore location in the RestoreFromLocalDir parameter of the SBT_PARMS file to copy the backup data. Example: /oracle/SbtStorage.
    Workflow

    Step Operation

    1

    Select a snapshot and initiates a restore.

    2

    Choose the option to restore the database from a snapshot or restore the database to a point-in-time.

    You can choose to restore all database files or select individual database elements, such as data files, control files, system parameter files, archive logs, wallet files, and metadata. For more information about restoring wallet files, see Restore Oracle Wallet files.

    You can also restore the selected database to the original Oracle server host or to another Oracle server host.

    3

    The requested snapshot is unpacked and downloaded to the specified restore location on the Oracle server host. The backup download location on the local Oracle server host is /<restore_location>/<Day-MMM-DD-Hour-Min-Sec-YYYY>.

    where:

    • The restore_location is the name of the directory and Day-MMM-DD-Hour-Min-Sec-YYYY is the folder created to store the downloaded data and is derived from the snapshot that you specified to restore the database.
    • The snapshot location is mapped to the Oracle server host and the DBA can now use RMAN commands to recover the database on the required Oracle server host.
    • In case of manual restore, the wallet files will be hidden at the following location:
      <restore_loaction>/day_mm_dd_hr_min_sec-yyy/job_id/.wallet
  • Oracle Database Administrator: The Database Administrator (DBA) runs RMAN scripts that fetch backup data from the restore location and restore the database on the required Oracle server host.

     Note: Ensure that the DBA has permission to access the restore directory and its parent directory.

    Workflow 

    Step Operation

    1

    Initiate a manual restore operation to recover the Oracle database from the downloaded backup data on the restore location. You can also choose to restore wallet files during manual restore.

    2

    Verify the backup data downloaded to the restore location.

    3

    Verify if the control file on the active database is intact or damaged

    3.1

    If the control file is intact:

    1. Shut down the active database.
    2. Mount the database using the alter database mount command.
    3. Open RMAN command prompt using the following command:
      $rman target <user>/<password>@<host_name>/<database_name>
    4. Configure the SBT channel and provide the Druva SBT library.
    5. Restore the database.
    6. Recover the database.
    7. Open the database using the alter database open command.
    8. Check the status of the database after it is recovered.
    9. Backup the database.

    For detailed steps, see Recover database when the control file is intact.

     

    3.2

    If the control file is damaged:

    1. Identify the control file from the downloaded backup data. The control file from the backup data has the following name format:
      Phx_<DBID>_<IncarnationNo>_CF
      Example: Phx_DN-SP01_DBID-1660729487_DT-20210128-142756_govlp4ld_1_1_CF
    2. Shut down the active database and bring the database in the NOMOUNT state.
    3. Open the RMAN command prompt and restore the control file.
    4. Mount the database.
    5. Configure the SBT channel.
    6. Restore the database.
    7. Recover the database.
    8. Open the database using the resetlogs option because we restored the control file. Verify the database incarnation.
    9. Check the status of the database after it is recovered.
    10. Backup the database.

    For detailed steps, see Recover database when the control file is damaged.

Restore Oracle Wallet files

You can restore your backed up wallet files automatically or manually from a snapshot or to a point in time. In case of automated restore, if you choose to restore wallet files and if a wallet directory already exists, then the existing wallet directory is renamed to <direcotoryname_original> and a new directory is created with the restored backup files. This way, the existing files are retained for future reference.  For example, if you have an existing directory of wallet files, say Wallet_21, and during automated restore if you choose to restore the wallet files, then the Wallet_21 directory would be renamed to Wallet_21_original and a new directory Wallet_21 would be created with the restored wallet fies.