User Tools

Site Tools


public:module:oracle:restore

8. Restoring Backup for Oracle Database Server


8.1. Overview


There are three (3) restore options to choose from:

  • Original location – CloudBacko Pro will restore the database(s) from the backup destination and apply them to the original production Oracle instance.
  • Alternate location – CloudBacko Pro will restore the database(s) from the backup destination and apply them to either the original Oracle instance or another Oracle instance on the production machine. This option can also be used to clone a database by changing the database name.
  • Restore raw file – CloudBacko Pro will restore the Oracle database files to a location on the local machine, which then can be copied to another Oracle server on another machine for recovery.

The Restore Raw File option is for advanced Oracle database administrators and should only be used if you have in-depth knowledge and understanding of Oracle database engine, Oracle database schema, knowledge of the database server and network infrastructure. Therefore, it is not recommended to use this restore option as there is need to utilize additional Oracle techniques and scripts to facilitate a manual database restore.

Please refer to the following articles of Oracle Database Backup and Recovery User's Guide for details:

8.2. Restore to Original Location


This feature is used to restore files from your backup destination and automatically apply them to the Oracle database server in the original location.

1. TNS listener service must be started to allow connections to the Oracle database server for the restore process. To check if the TNS listener service is running, use the lsnrctl status command. If the TNS listener service is not started, use the lsnrctl start command to start the service.

Example: A running TNS Listener service on Oracle 19c.

C:\Users\Administrator>lsnrctl status

LSNRCTL for 64-bit Windows: Version 19.0.0.0.0 - Production on 14-OCT-2020 16:45:29

Copyright (c) 1991, 2019, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=ora19c-w2k16)(PORT=1521)))

STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for 64-bit Windows: Version 19.0.0.0.0 - Production
Start Date                14-OCT-2020 11:11:04
Uptime                    0 days 5 hr. 34 min. 27 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   D:\oracle\19.3.0\dbhome\network\admin\listener.ora
Listener Log File         D:\oracle\diag\tnslsnr\ora19c-w2k16\listener\alert\log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ora19c-w2k16)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1521ipc)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=ora19c-w2k16)(PORT=5500))(Security=(my_wallet_directory=D:\ORACLE\admin\orcl\xdb_wallet))(Presentation=HTTP)(Session=RAW))
Services Summary...
Service "52448234712340b69f274bcc790ecfe0" has 1 instance(s).
  Instance "orcl", status READY, has 1 handler(s) for this service...
Service "9400891b61bb4c4c8b3997957ffa8c8e" has 1 instance(s).
  Instance "orcl", status READY, has 1 handler(s) for this service...
Service "CLRExtProc" has 1 instance(s).
  Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "orcl" has 1 instance(s).
  Instance "orcl", status READY, has 1 handler(s) for this service...
Service "orclXDB" has 1 instance(s).
  Instance "orcl", status READY, has 1 handler(s) for this service...
Service "orclpdb" has 1 instance(s).
  Instance "orcl", status READY, has 1 handler(s) for this service...
The command completed successfully

C:\Users\Administrator>

The values shown are just examples and might be different on your Oracle instance.

2. Run the sqlplus / as sysdba command to verify if the Oracle service is active.

The following is just an example after an Oracle instance failure due to corrupted data and/or configuration files. It might be different on your Oracle instance.

C:\Users\Administrator>sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Thu Nov 12 10:31:33 2020

Version 19.3.0.0.0

Copyright (c) 1982, 2019, Oracle.  All rights reserved.

Connected to an idle instance.

3. On the CloudBacko Pro main interface, click the Restore icon.

4. Select the backup set that you would like to restore the Oracle database from.

5. Select the destination storage that contains the Oracle database(s) that you would like to restore from.

6. Select the database(s) that you would like to restore. You can also choose to restore backed up database from a specific backup job using the Select what to restore drop-down menu. Click Next to proceed.

7. Choose Original location as where the database(s) will be restored.

If you would like to enable the Verify checksum of in-file delta files during restore setting, click the Show advanced option link.

8. Make sure that the temporary directory path is correct. To change its location, click Browse then click OK to select. Click Restore to start the restore process.

9. When this pop-up message is displayed, click Yes to continue.

10. Restore job has completed successfully.

11. After the restore job is completed, verify if the Oracle database instance has been restored using the following SQL query to verify if the instance is online.

C:\Users\Administrator>sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Wed Oct 14 14:07:32 2020

Version 19.3.0.0.0

Copyright (c) 1982, 2019, Oracle.  All rights reserved.

Connected to:

Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production

Version 19.3.0.0.0

SQL> select instance from v$thread;

INSTANCE

---------------------------------------------------------------

orcl

SQL>

8.3. Restore to Alternate Location

1. TNS listener service must be started to allow connections to the Oracle database server for the restore process. To check if the TNS listener service is running, use the lsnrctl status command. If the TNS listener service is not started, use the lsnrctl start command to start the service.

Example: A running TNS Listener service on Oracle 19c.

C:\Users\Administrator>lsnrctl status

LSNRCTL for 64-bit Windows: Version 19.0.0.0.0 - Production on 14-OCT-2020 16:45:29

Copyright (c) 1991, 2019, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=ora19c-w2k16)(PORT=1521)))
STATUS of the LISTENER
------------------------

Alias                     LISTENER
Version                   TNSLSNR for 64-bit Windows: Version 19.0.0.0.0 - Production
Start Date                14-OCT-2020 11:11:04
Uptime                    0 days 5 hr. 34 min. 27 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   D:\oracle\19.3.0\dbhome\network\admin\listener.ora
Listener Log File         D:\oracle\diag\tnslsnr\ora19c-w2k16\listener\alert\log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ora19c-w2k16)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1521ipc)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=ora19c-w2k16)(PORT=5500))(Security=(my_wallet_directory=D:\ORACLE\admin\orcl\xdb_wallet))(Presentation=HTTP)(Session=RAW))
Services Summary...
Service "52448234712340b69f274bcc790ecfe0" has 1 instance(s).
  Instance "orcl", status READY, has 1 handler(s) for this service...
Service "9400891b61bb4c4c8b3997957ffa8c8e" has 1 instance(s).
  Instance "orcl", status READY, has 1 handler(s) for this service...
Service "CLRExtProc" has 1 instance(s).
  Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "orcl" has 1 instance(s).
  Instance "orcl", status READY, has 1 handler(s) for this service...
Service "orclXDB" has 1 instance(s).
  Instance "orcl", status READY, has 1 handler(s) for this service...
Service "orclpdb" has 1 instance(s).
  Instance "orcl", status READY, has 1 handler(s) for this service...
The command completed successfully

C:\Users\Administrator>

The values shown are just examples and might be different on your Oracle instance.

2. Run the sqlplus / as sysdba command to verify if the Oracle service is active.

The following is just an example after an Oracle instance failure due to corrupted data and/or configuration files. It might be different on your Oracle instance.

C:\Users\Administrator>sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Thu Nov 12 10:31:33 2020

Version 19.3.0.0.0

Copyright (c) 1982, 2019, Oracle.  All rights reserved.

Connected to an idle instance.

3. Create the top level folder for the Alternate Location of the database instance that will be restored. For example, D:\orcl1

4. Assign correct permissions to the created folder. To assign, right-click on the folder then select Properties.

Go to the Security tab then click Edit.

Click the Add button then add the the oracle user account to the folder with Full control.

Click Apply then click OK to save changes.

Please refer to Appendix B for more details.

5. On the CloudBacko Pro main interface, click the Restore icon.

6. Select the backup set that you would like to restore the Oracle database from.

7. Select the destination storage that contains the Oracle database(s) that you would like to restore from.

8. Select the database(s) that you would like to restore, then click Next to proceed.

9. Choose Alternate location as where the database(s) will be restored.

If you would like to enable the Verify checksum of in-file delta files during restore setting, click the Show advanced option link.

10. Configure the following settings in the Alternate database screen:

  • Oracle Home – where the Oracle_Home path is located. This is already set to the location of the Oracle_Home by default.
  • Host – this value is set to 127.0.0.1.
  • Port – the new port number of the alternate Oracle database instance.
  • SID – the new SID for the alternate Oracle database instance.

If a restore will be performed to an alternate location, it is required to change the Oracle SID and port number.

  • Password – the password for the system user account in the new database.
  • As the password validation is performed during the start of the actual restore process after the hostname, port number, SID, and all the database file locations are confirmed, ensure that you have entered the correct password in the Database Credentials.
  • If a mistake in entering the correct password is made, this will result to a failed restore process and will require to go back at the beginning to start all the configuration settings again. Please refer to Appendix A for more details.

Once configured, click Next to proceed.

11. Once the Oracle database instance has been modified, it will reflect on the original Database File Locations automatically. Click Next to proceed.

12. Make sure that the temporary directory path is correct. To change its location, click Browse then click OK to select. Click Restore to start the restore process.

13. When this pop-up message appeared, enter the Windows user account password then click OK to continue with the restore process.

14. Restore job has completed successfully.

15. After the restore job is completed, verify if the Oracle database instance has been restored using the following SQL query to verify if the instance is online.

C:\Users\Administrator>sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Wed Oct 14 14:07:32 2020

Version 19.3.0.0.0

Copyright (c) 1982, 2019, Oracle.  All rights reserved.

Connected to:

Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production

Version 19.3.0.0.0

SQL> select instance from v$thread;

INSTANCE

---------------------------------------------------------------

orcl1

SQL>

8.4. Restore Raw File


This feature is used to restore the Oracle database(s) from your storage destination to a location on disk and manually recover the databases.

1. On the CloudBacko Pro main interface, click the Restore icon.

2. Select the backup set that you would like to restore the Oracle database from.

3. Select the destination storage that contains the Oracle database(s) that you would like to restore from.

4. Click the Restore raw file option then select the Oracle database(s) to be restored. Click Next to proceed.

5. Click Browse to select the location on the local machine where you wish to restore the Oracle database(s) to. Click Next to proceed.

If you would like to enable the Verify checksum of in-file delta files during restore setting, click the Show advanced option link.

6. Make sure that the temporary directory path is correct. To change its location, click Browse then click OK to select. Click Restore to start the restore process.

7. Restore job has completed successfully.

8. After the restore job is completed, verify if the Oracle database(s) have been restored. Go to the designated path on the local machine where you restored the Oracle database files to.

Example: using Windows File Explorer

9. Recovering RAW Oracle databases

To recover RAW databases, please refer to the following articles of Oracle Database Backup and Recovery User's Guide for details:

public/module/oracle/restore.txt · Last modified: 2021/04/20 18:20 by ronnie.chan