Home > Storage > PowerFlex > White Papers > Dell PowerFlex with Data Domain Cloud Tier > Restore and recover Oracle database
The following section describes the steps to return the Oracle database to normal operation by restoring the damaged or deleted datafiles from the RMAN agent backups that are stored in the cloud tier using Amazon S3 object store.
Perform the following steps to restore and complete the recovery:
Note: This step is only to simulate a data loss scenario; do not perform this step in a production environment.
ASMCMD> cd +DATA/ORADB19C2/DATAFILE ASMCMD> ls DAILY_CHANGE_TBS.263.1098162981 SLOBDATA.262.1098161549 SYSAUX.257.1098159751 SYSTEM.256.1098159747 UNDOTBS1.258.1098159753 USERS.260.1098159823 ASMCMD> ASMCMD> rm * You may delete multiple files and/or directories. Are you sure? (y/n) y ASMCMD> |
The database fails to open due to the following error:
[oracle@oradb2 ~]$ sqlplus / as sysdba SQL*Plus: Release 19.0.0.0.0 - Production on Fri Jun 3 05:05:58 2022 Version 19.3.0.0.0 Copyright (c) 1982, 2019, Oracle. All rights reserved. Connected to an idle instance. SQL> startup ORACLE instance started.
Total System Global Area 5049940152 bytes Fixed Size 8906936 bytes Variable Size 922746880 bytes Database Buffers 4110417920 bytes Redo Buffers 7868416 bytes Database mounted. ORA-01157: cannot identify/lock data file 1 - see DBWR trace file ORA-01110: data file 1: '+DATA/ORADB19C2/DATAFILE/system.256.1098159747' |
During a restore operation, if a required backup file is not in the active tier, the Oracle RMAN agent automatically recalls the backup file from the cloud. The Oracle RMAN agent waits for the file to become available before continuing the restore. The time taken by the recall process depends on the file size and the speed of the network between the cloud and the Data Domain system.
RMAN> restore database preview recall; |
For example: sysadmin@ddve# sysadmin@ddve# data-movement status path all Data-movement recall: --------------------- Path Name (*) Status File Size Logical Logical Time Queued (**) Time Started Time Ended Bytes Moved Bytes Verified ------------------------------------- --------- --------- ----------- -------------- ----------------- ----------------- ----------------- /data/col1/oracle_backup/080rv5m6_1_1 completed 1.10 TiB 1.10 TiB 1.10 TiB Jun 3 2022 02:09 Jun 3 2022 02:09 Jun 3 2022 11:00 |
RMAN> RUN { ALLOCATE CHANNEL CH1 TYPE 'SBT_TAPE' TRACE 5 PARMS 'BLKSIZE=1048576, SBT_LIBRARY=/home/oracle/opt/dpsapps/rmanagent/lib/libddobk.so, ENV=(STORAGE_UNIT=oracle_backup, BACKUP_HOST=192.168.105.175, RMAN_AGENT_HOME=/home/oracle/opt/dpsapps/rmanagent/)'; send 'set username pfuser password Dellam123! servername 192.168.105.175 storageunit oracle_backup'; RESTORE DATABASE; RELEASE CHANNEL CH1; } |
RMAN> RUN { ALLOCATE CHANNEL CH1 TYPE 'SBT_TAPE' TRACE 5 PARMS 'BLKSIZE=1048576, SBT_LIBRARY=/home/oracle/opt/dpsapps/rmanagent/lib/libddobk.so, ENV=(STORAGE_UNIT=oracle_backup, BACKUP_HOST=192.168.105.175, RMAN_AGENT_HOME=/home/oracle/opt/dpsapps/rmanagent/)'; send 'set username pfuser password Dellam123! servername 192.168.105.175 storageunit oracle_backup'; RECOVER DATABASE; RELEASE CHANNEL CH1; } |
RMAN> alter database open;
Statement processed
RMAN> select name,open_mode from v$database;
NAME OPEN_MODE --------- -------------------- ORADB1 READ WRITE
RMAN> |