Restore

This documentation outlines step-by-step process for restoring Oracle database backups using Zmanda Pro's Backup Manager.

Pre-requisites

  1. Make sure Backup Manager login command is run and configs are loaded before starting with restore.

  2. Ensure Zmanda Pro is installed and properly configured on the client machine.

  3. Backup Manager must be installed on the client machine.

  4. You must know the Protected Item (PI) name and the Storage Information name used for backups.

  5. The device on which you are running the restore must be connected to the Zmanda Pro server to on which the chosen protected backups exists.

1. Client Triggered Restore

If the restore command is exited (either gracefully or forcefully), the inventory database may not close properly. As a workaround, you'll need to manually delete all inventory database-related files after exiting the restore process.

1.1 Initiate Restore Command

On the client machine, execute the following command in the terminal:

backupmanager rman restore --pi-name <Protected Item Name> --storage-vault <Storage Vault Name>

1.2 Enter the Device Name

You will be prompted to enter the device name where the Oracle database is hosted. If the default device name matches your intended restore device, press Enter to continue. Otherwise, input the correct device name.

Example:

Enter the Device Name (default: VSP-ZMD-US-DEN-VM-DEVL-IT18598): [Enter the appropriate device name]

1.3 Verify Database Configuration

The database configuration will be displayed. Verify that the details (such as Database Name , Host , Port , etc.) match the database you intend to restore. Example:

Database Configuration:
+-----------------------+---------------------------------+
| PROPERTY              | VALUE                           |
+-----------------------+---------------------------------+
| Database Name         | ORCLCDB                         |
| Database DBID         | 2933840689                      |
| Database Username     | SYS                             |
| Database Password     | ********                        |
| Database Host         | VSP-ZMD-US-DEN-VM-DEVL-IT-18872 |
| Database Port         | 1521                            |
| Database Service Name | orclcdb                         |
| Database Role         | SYSDBA                          |
+-----------------------+---------------------------------+

1.4 Select the Backup Run

Once the backup information is loaded, you will be prompted to select the specific backup run for restoration. Use the arrow keys to navigate through the available backup runs and select the one you wish to restore.

Example:

Select Backup Run:
> 2024-09-28 20-35 Incremental Level 0
 2024-09-28 21-39 Incremental Level 0
 2024-09-30 06-51 Incremental Level 0
 2024-09-30 07-07 Incremental Level 0

For each active selection, backup details such as Backup Time, SCN, and Sequence will be displayed. Review the details and click enter to confirm your selection.

Please note that if there is no backup taken for the protected item with given storage vault, then the command goes into hang state, you can exit by clicking "ctrl+c"

1.5 Choose the Restore Location

After selecting the backup run, you will be prompted to choose the restore location:

1.5.1 Restore to Original Directory: Select this option to restore the database files to their original location from where they were backed up.

1.5.2 Restore to Custom Directory: If you want to restore the files to a different location, select this option and specify the custom directory.

Example:

Where do you want to restore?
> Restore to Original Directory 
  Restore to Custom Directory

1.6 Create Restore Directory (If Needed)

The restore fails if the directory does not exist. So it is recommended to select YES for this operation.

Select Yes to allow automatic directory creation.

Example:

Do you want to create the restore directory if it does not ex
ist?
> Yes
  No 

1.7 Update Restore Directory Ownership

Update the restore directory user/group ownership to match with Oracle database user/group. This is important for ensuring the directory is accessible to oracle database user for the RMAN restore process. Select Yes to allow the update.

Default user and group for linux systems is ORACLE : OINSTALL

WARNING: RMAN Cataloging feature will not work if the restore directory is not accessible by oracle database user/group. So it is recommended to select YES for this option so that backupmanager agent will automatically adjust the required permissions when necessary

Example:

Allow Zmanda Pro backupmanager to update the restore directory user/group to oracle database user/group when required?
> Yes
  No

1.8 Catalog the Backup Pieces

You will then be asked if you want to catalog all the backup pieces into the current control file of the target Oracle database. Cataloging is required for RMAN to recognize the restored backup pieces. Select Yes to proceed with the cataloging process.

Example:

Do you want to catalog all the backup pieces to the current controlfile on the target database?
> Yes
  No

After cataloging, a summary will be displayed, indicating whether any unknown backup pieces were found and cataloged.

Example:

Catalog process completed. Summary:
- Total backup pieces unknown to the database: 4
- Total backup pieces successfully cataloged: 4

1.9 Restore Completion

Once the restore is complete, the system will confirm the success of the operation and display the restore location.

Example:

Restore location: /var/lib/zmandapro/backupmanager/workloads/databases/oracle/ORCL-15489263116/sample-PI
SUCCESS: Restore operation completed.

Notes

  1. Ensure that the Oracle database user/group has appropriate permissions to access the restore directory, especially if restoring to a custom directory.

  2. If you need to restore the control file from the backup, note that the cataloged information will be lost and will need to be re-cataloged after the control file restore inside RMAN. So, use backupmanager’s cataloging feature only if you are not restoring control-file from the restored data.

Troubleshooting

Restore Directory Permissions Issues: If the Oracle database user cannot access the restore directory, ensure that the directory permissions are correctly set in a way that it is accessible by oracle user/group. Better alternative will be to allow backupmanager to update the ownership during the restore process.

Last updated