In this post, i am going
to illustrate how we can create a database instance in cloud using the
on premise database backups stored in Oracle Cloud. This covers the restore scenarios
where in case of any disaster in on premise, we can have instance up and running in Oracle
cloud.
The first step would be
to install the backup model to the on premise database. Download the
opc_installer.zip from the website
"http://www.oracle.com/technetwork/database/availability/oracle-cloud-backup-2162729.html"
and unzip the contents.
In the on premise
database, create the following directories lib and wallet, extract the zip file
and install it. I have created it under /home/oracle.
Download the jdk-7u80-linux-x64.tar.gz.
-rw-r--r-- 1 oracle
oinstall 153530841 Aug 7 2018 jdk-7u80-linux-x64.tar.gz
tar zxvf
jdk-7u80-linux-x64.tar.gz
[oracle@rac1 ~]$ cd
jdk1.7.0_80
[oracle@rac1
jdk1.7.0_80]$ ls
bin
COPYRIGHT db include jre lib LICENSE
man README.html release src.zip
THIRDPARTYLICENSEREADME-JAVAFX.txt THIRDPARTYLICENSEREADME.txt
[oracle@rac1
jdk1.7.0_80]$ cd bin
[oracle@rac1 bin]$ ls
-lrt java
-rwxr-xr-x 1 oracle
oinstall 7718 Apr 10 2015 java
[oracle@rac1 bin]$ pwd
/home/oracle/jdk1.7.0_80/bin
[oracle@rac1 bin]$
/home/oracle/jdk1.7.0_80/bin/java -version
java version "1.7.0_80"
Java(TM) SE Runtime
Environment (build 1.7.0_80-b15)
Java HotSpot(TM) 64-Bit Server VM (build 24.80-b11
Also, before installing
the backup module make sure, we have the valid container in place in Oracle
Cloud to store the backups.
Now, install the backup module.
/home/oracle/jdk1.7.0_80/bin/java -jar opc_install.jar -host
https://*****.us.storage.oraclecloud.com/v1/Storage-********* -opcId email id
-opcPass password -walletDir /home/oracle/wallet -libDir /home/oracle/lib
Oracle Database Cloud
Backup Module Install Tool, build 12.2.0.1.0DBBKPCSBP_2018-06-12
Oracle Database Cloud
Backup Module credentials are valid.
Oracle Database Cloud
Backup Module wallet created in directory /home/oracle/wallet.
Oracle Database Cloud
Backup Module initialization file /u01/12c/oracledb/ORCLuct/12c/db_1/dbs/opcORCL.ora
created.
Downloading Oracle
Database Cloud Backup Module Software Library from file opc_linux64.zip.
Download complete.
Verify the contents of
wallet and lib directory.
[oracle@rac1 ~]$ cd
wallet/
[oracle@rac1 wallet]$ ls
-lrt
total 12
-rw------- 1 oracle
oinstall 0 Aug 2 00:28 cwallet.sso.lck
-rw------- 1 oracle
oinstall 1645 Aug 2 00:28 cwallet.sso
[oracle@rac1 wallet]$ cd
../lib
[oracle@rac1 lib]$ ls
-lrt
total 86360
-rw-r--r-- 1 oracle
oinstall 16801 Aug 2 00:40 bulkimport.pl
-rw-r--r-- 1 oracle
oinstall 11140 Aug 2 00:40 perl_readme.txt
-rw-r--r-- 1 oracle
oinstall 40661 Aug 2 00:40 odbsrmt.pm
-rw-r--r-- 1 oracle
oinstall 13730 Aug 2 00:40 odbsrmt.pl
-rw-r--r-- 1 oracle
oinstall 286 Aug 2 00:40 metadata.xml
-rw-r--r-- 1 oracle
oinstall 88215837 Aug 2 00:40 libopc.so
[oracle@rac1 lib]$
The name of on-premises
database is ORCL. Now connect to RMAN and change the following configurations.
As Oracle uses libopc.so library we need to configure the SBT_TAPE channel to
use this library in all RMAN backups.
Note: Oracle Cloud uses
the encryption. which is mandatory for storing the backups. The rman encryption
methods available are • Password encryption • Transparent Data Encryption
(TDE) • Dual-mode encryption (combination of password and TDE)
For more details, visit
the Oracle documentation https://docs.oracle.com/en/cloud/paas/db-backup-cloud/csdbb/backing-oracle-database-backup-cloud-service.html
In my notes, I have used
the password encryption method.
Now configure the rman
settings.
RMAN> CONFIGURE
CHANNEL DEVICE TYPE 'SBT_TAPE' PARMS
'SBT_LIBRARY=/home/oracle/lib/libopc.so
ENV=(OPC_PFILE=/u01/12c/oracledb/ORCLuct/12c/db_1/dbs/opcORCL.ora)';2>
3>
new RMAN configuration
parameters:
CONFIGURE CHANNEL DEVICE
TYPE 'SBT_TAPE' PARMS
'SBT_LIBRARY=/home/oracle/lib/libopc.soENV=(OPC_PFILE=/u01/12c/oracledb/ORCLuct/12c/db_1/dbs/opcORCL.ora)';
new RMAN configuration
parameters are successfully stored
configure autobackup of
controlfile
RMAN> CONFIGURE
CONTROLFILE AUTOBACKUP ON;
new RMAN configuration
parameters:
CONFIGURE CONTROLFILE
AUTOBACKUP ON;
new RMAN configuration
parameters are successfully stored
Change the default
channel to tape (media -> Oracle Cloud Backup Storage)
RMAN> CONFIGURE
DEFAULT DEVICE TYPE TO 'SBT_TAPE';
new RMAN configuration
parameters:
CONFIGURE DEFAULT DEVICE
TYPE TO 'SBT_TAPE';
new RMAN configuration
parameters are successfully stored
verify the contents
again
RMAN> show all;
RMAN configuration
parameters for database with db_unique_name ORCL are:
CONFIGURE RETENTION
POLICY TO REDUNDANCY 1; # default
CONFIGURE BACKUP
OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE
TYPE TO 'SBT_TAPE';
CONFIGURE CONTROLFILE
AUTOBACKUP ON;
CONFIGURE CONTROLFILE
AUTOBACKUP FORMAT FOR DEVICE TYPE SBT_TAPE TO '%F'; # default
CONFIGURE CONTROLFILE
AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
CONFIGURE DEVICE TYPE
SBT_TAPE PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
CONFIGURE DEVICE TYPE
DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
CONFIGURE DATAFILE
BACKUP COPIES FOR DEVICE TYPE SBT_TAPE TO 1; # default
CONFIGURE DATAFILE
BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG
BACKUP COPIES FOR DEVICE TYPE SBT_TAPE TO 1; # default
CONFIGURE ARCHIVELOG
BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE CHANNEL DEVICE
TYPE 'SBT_TAPE' PARMS 'SBT_LIBRARY=/home/oracle/lib/libopc.so
ENV=(OPC_PFILE=/u01/12c/oracledb/ORCLuct/12c/db_1/dbs/opcORCL.ora)';
CONFIGURE MAXSETSIZE TO
UNLIMITED; # default
CONFIGURE ENCRYPTION FOR
DATABASE OFF; # default
CONFIGURE ENCRYPTION
ALGORITHM 'AES128'; # default
CONFIGURE COMPRESSION
ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default
CONFIGURE RMAN OUTPUT TO
KEEP FOR 7 DAYS; # default
CONFIGURE ARCHIVELOG
DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT
CONTROLFILE NAME TO '/u01/12c/oracledb/ORCLuct/12c/db_1/dbs/snapcf_ORCL.f'; #
default
I have created a table
at on premise database which i will query to verify after the disaster recovery
in cloud.
create a table in the on
premise db
SQL> create table sam
as select * from dba_objects where rownum<=70;
Table created.
SQL>
SQL> create
table sam as select * from all_objects;
> select
count(1) from sam;
COUNT(1)
----------
89384
Now take the
backup.after enabling the encryption.
RMAN> set
encryption on identified by "welcome123" only;
note:If you forget or lose the
password, you won’t be able to restore the backup.
RMAN> backup database
plus archivelog;
Starting backup at
02-AUG-18
current log archived
allocated channel:
ORA_SBT_TAPE_1
channel ORA_SBT_TAPE_1:
SID=50 device type=SBT_TAPE
channel ORA_SBT_TAPE_1:
Oracle Database Backup Service Library VER=12.2.0.2
channel ORA_SBT_TAPE_1:
starting archived log backup set
channel ORA_SBT_TAPE_1:
specifying archived log(s) in backup set
input archived log
thread=1 sequence=10 RECID=1 STAMP=983052020
input archived log
thread=1 sequence=11 RECID=2 STAMP=983052050
input archived log
thread=1 sequence=12 RECID=3 STAMP=983052099
input archived log
thread=1 sequence=13 RECID=4 STAMP=983055646
input archived log
thread=1 sequence=14 RECID=5 STAMP=983062553
input archived log
thread=1 sequence=15 RECID=6 STAMP=983062688
channel ORA_SBT_TAPE_1:
starting piece 1 at 02-AUG-18
Starting backup at
02-AUG-18
current log archived
using channel
ORA_SBT_TAPE_1
channel ORA_SBT_TAPE_1:
starting archived log backup set
channel ORA_SBT_TAPE_1:
specifying archived log(s) in backup set
input archived log
thread=1 sequence=16 RECID=7 STAMP=983063596
channel ORA_SBT_TAPE_1:
starting piece 1 at 02-AUG-18
channel ORA_SBT_TAPE_1:
finished piece 1 at 02-AUG-18
piece handle=03t9gn1c_1_1
tag=TAG20180802T011316 comment=API Version 2.0,MMS Version 12.2.0.2
input datafile file
number=00006 name=/u01/12c/oracledb/oradata/ORCL/datafile/o1_mf_users_fp2wkc6g_.dbf
channel ORA_SBT_TAPE_1:
backup set complete, elapsed time: 00:00:25
Finished backup at
02-AUG-18
Starting Control File
and SPFILE Autobackup at 02-AUG-18
piece
handle=c-394828052-20180802-00 comment=API Version 2.0,MMS Version 12.2.0.2
Finished Control File
and SPFILE Autobackup at 02-AUG-18
Now the backups are
stored in the Cloud.
Next would be to
configure the cloud instance. Copy the opc installer to cloud instance and
install it the same way we did it for on premise database. Configure ssh
connectivity from on premise and drop the cloud database instance if any. Start
the database in no mount and restore the files as illustrated below.
SQL> startup force
mount exclusive restrict;
ORACLE instance started.
Total System Global Area
2768240640 bytes
Fixed
Size
2928248 bytes
Variable
Size
704643464 bytes
Database
Buffers 1979711488 bytes
Redo
Buffers
80957440 bytes
Database mounted.
SQL> drop
database;
Database dropped.
Disconnected from Oracle
Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit ORCLuction
With the Partitioning,
OLAP, Advanced Analytics and Real Application Testing options
SQL> exit;
[oracle@ORCL ~]$ sqlplus
/ as sysdba
SQL*Plus: Release
12.1.0.2.0 ORCLuction on Sat Aug 11 13:29:38 2018
Copyright (c) 1982,
2014, Oracle. All rights reserved.
Connected to an idle
instance.
SQL> startup nomount;
ORACLE instance started.
Now restore the files.
[oracle@ORCL ~]$ rman
target /
Recovery Manager:
Release 12.1.0.2.0 - ORCLuction on Thu Aug 23 15:26:12 2018
Copyright (c) 1982,
2014, Oracle and/or its affiliates. All rights reserved.
connected to target
database: ORCL (not mounted)
RMAN> set decryption
identified by "welcome123";
executing command: SET
decryption
using target database
control file instead of recovery catalog
RMAN> run
2> {
3> allocate channel
t1 type 'SBT_TAPE' PARMS
4>
'SBT_LIBRARY=/home/oracle/lib/libopc.so ENV=(OPC_PFILE=/u01/app/oracle/ORCLuct/12.1.0/dbhome_1/dbs/opcORCL.ora)';
5> set
dbid=1510897456;
6> restore spfile to
pfile '/tmp/pfile.ora' from autobackup;
7> }
allocated channel: t1
channel t1: SID=12
device type=SBT_TAPE
channel t1: Oracle
Database Backup Service Library VER=12.2.0.2
executing command: SET
DBID
Starting restore at
23-AUG-18
channel t1: looking for
AUTOBACKUP on day: 20180823
channel t1: looking for
AUTOBACKUP on day: 20180822
channel t1: looking for
AUTOBACKUP on day: 20180821
channel t1: looking for
AUTOBACKUP on day: 20180820
channel t1: looking for
AUTOBACKUP on day: 20180819
channel t1: looking for
AUTOBACKUP on day: 20180818
channel t1: looking for
AUTOBACKUP on day: 20180817
channel t1: AUTOBACKUP
found: c-1510897456-20180817-00
channel t1: restoring
spfile from AUTOBACKUP c-1510897456-20180817-00
channel t1: SPFILE restore
from AUTOBACKUP complete
Finished restore at
23-AUG-18
released channel: t1
Now the pfile which got
created under /tmp, i copied the same to $ORACL_HOME/dbs and altered the
directories path to point to the current cloud instance.(It was pointing to the
on premise path)
now restore the control
file from autobackup
[oracle@ORCL dbs]$ rman
target /
Recovery Manager:
Release 12.1.0.2.0 - ORCLuction on Thu Aug 23 16:24:59 2018
Copyright (c) 1982,
2014, Oracle and/or its affiliates. All rights reserved.
connected to target
database: ORCL (not mounted)
RMAN> set decryption
identified by "welcome123";
executing command: SET
decryption
using target database
control file instead of recovery catalog
RMAN> run
2> {
3> allocate channel
t1 type 'SBT_TAPE' PARMS 'SBT_LIBRARY=/home/oracle/lib/libopc.so
ENV=(OPC_PFILE=/u01/app/oracle/ORCLuct/12.1.0/dbhome_1/dbs/opcORCL.ora)';
4> set
dbid=1510897456;
5> restore
controlfile from autobackup;
6> }
allocated channel: t1
channel t1: SID=12
device type=SBT_TAPE
channel t1: Oracle
Database Backup Service Library VER=12.2.0.2
executing command: SET
DBID
Starting restore at
23-AUG-18
channel t1: looking for
AUTOBACKUP on day: 20180823
channel t1: looking for
AUTOBACKUP on day: 20180822
channel t1: looking for
AUTOBACKUP on day: 20180821
channel t1: looking for
AUTOBACKUP on day: 20180820
channel t1: looking for
AUTOBACKUP on day: 20180819
channel t1: looking for
AUTOBACKUP on day: 20180818
channel t1: looking for
AUTOBACKUP on day: 20180817
channel t1: AUTOBACKUP
found: c-1510897456-20180817-00
channel t1: restoring
control file from AUTOBACKUP c-1510897456-20180817-00
channel t1: control file
restore from AUTOBACKUP complete
output file
name=/u02/app/oracle/oradata/ORCL/o1_mf_fp6rmgrq_.ctl
output file
name=/u03/app/oracle/fast_recovery_area/ORCL/o1_mf_fp6rmjo0_.ctl
Finished restore at
23-AUG-18
released channel: t1
RMAN>
Control file are restored. Start the database in
MOUNT mode and restore the datafiles. Specify a new folder using SET NEWNAME
FOR DATABASE TO command as follows:
SQL> shut immediate;
ORA-01507: database not
mounted
ORACLE instance shut
down.
SQL> startup mount;
ORACLE instance started.
Total System Global Area
2768240640 bytes
Fixed Size
2928248
bytes
Variable
Size
704643464 bytes
Database
Buffers 2046820352 bytes
Redo
Buffers
13848576 bytes
Database mounted.
SQL>
Now restore the
datafiles.
RMAN> set decryption
identified by "welcome123";
executing command: SET
decryption
using target database
control file instead of recovery catalog
RMAN> run
2> {
3> allocate channel
t1 type 'SBT_TAPE' PARMS 'SBT_LIBRARY=/home/oracle/lib/libopc.so
ENV=(OPC_PFILE=/u01/app/oracle/ORCLuct/12.1.0/dbhome_1/dbs/opcORCL.ora)';
4> set newname for
database to '/u01/12c/oracledb/oradata//%U.dbf';
5> restore database;
6> switch datafile
all;
7> }
allocated channel: t1
channel t1: SID=12
device type=SBT_TAPE
channel t1: Oracle
Database Backup Service Library VER=12.2.0.2
executing command: SET
NEWNAME
Starting restore at
23-AUG-18
channel t1: starting
datafile backup set restore
channel t1: specifying
datafile(s) to restore from backup set
channel t1: restoring
datafile 00001 to /u01/12c/oracledb/oradata//data_D-ORCL_TS-SYSTEM_FNO-1.dbf
channel t1: restoring
datafile 00003 to /u01/12c/oracledb/oradata//data_D-ORCL_TS-SYSAUX_FNO-3.dbf
channel t1: restoring
datafile 00004 to /u01/12c/oracledb/oradata//data_D-ORCL_TS-UNDOTBS1_FNO-4.dbf
channel t1: restoring
datafile 00006 to /u01/12c/oracledb/oradata//data_D-ORCL_TS-USERS_FNO-6.dbf
channel t1: reading from
backup piece 03tapfjj_1_1
channel t1: piece
handle=03tapfjj_1_1 tag=TAG20180817T121754
channel t1: restored
backup piece 1
channel t1: restore
complete, elapsed time: 00:00:25
channel t1: starting
datafile backup set restore
channel t1: specifying
datafile(s) to restore from backup set
channel t1: restoring
datafile 00008 to /u01/12c/oracledb/oradata//data_D-ORCL_TS-SYSTEM_FNO-8.dbf
channel t1: restoring
datafile 00009 to /u01/12c/oracledb/oradata//data_D-ORCL_TS-SYSAUX_FNO-9.dbf
channel t1: restoring
datafile 00010 to /u01/12c/oracledb/oradata//data_D-ORCL_TS-USERS_FNO-10.dbf
channel t1: reading from
backup piece 04tapgas_1_1
channel t1: piece
handle=04tapgas_1_1 tag=TAG20180817T121754
channel t1: restored
backup piece 1
channel t1: restore
complete, elapsed time: 00:00:15
channel t1: starting
datafile backup set restore
channel t1: specifying
datafile(s) to restore from backup set
channel t1: restoring
datafile 00011 to /u01/12c/oracledb/oradata//data_D-ORCL_TS-SYSTEM_FNO-11.dbf
channel t1: restoring
datafile 00012 to /u01/12c/oracledb/oradata//data_D-ORCL_TS-SYSAUX_FNO-12.dbf
channel t1: restoring
datafile 00013 to /u01/12c/oracledb/oradata//data_D-ORCL_TS-USERS_FNO-13.dbf
channel t1: reading from
backup piece 05tapgmj_1_1
channel t1: piece
handle=05tapgmj_1_1 tag=TAG20180817T121754
channel t1: restored
backup piece 1
channel t1: restore
complete, elapsed time: 00:00:15
channel t1: starting
datafile backup set restore
channel t1: specifying
datafile(s) to restore from backup set
channel t1: restoring
datafile 00005 to /u01/12c/oracledb/oradata//data_D-ORCL_TS-SYSTEM_FNO-5.dbf
channel t1: restoring
datafile 00007 to /u01/12c/oracledb/oradata//data_D-ORCL_TS-SYSAUX_FNO-7.dbf
channel t1: reading from
backup piece 06taph20_1_1
channel t1: piece
handle=06taph20_1_1 tag=TAG20180817T121754
channel t1: restored
backup piece 1
channel t1: restore
complete, elapsed time: 00:00:15
Finished restore at
23-AUG-18
datafile 1 switched to
datafile copy
input datafile copy
RECID=15 STAMP=984933730 file
name=/u01/12c/oracledb/oradata/data_D-ORCL_TS-SYSTEM_FNO-1.dbf
datafile 3 switched to
datafile copy
input datafile copy
RECID=16 STAMP=984933731 file
name=/u01/12c/oracledb/oradata/data_D-ORCL_TS-SYSAUX_FNO-3.dbf
datafile 4 switched to
datafile copy
input datafile copy
RECID=17 STAMP=984933731 file
name=/u01/12c/oracledb/oradata/data_D-ORCL_TS-UNDOTBS1_FNO-4.dbf
datafile 5 switched to
datafile copy
input datafile copy
RECID=18 STAMP=984933731 file
name=/u01/12c/oracledb/oradata/data_D-ORCL_TS-SYSTEM_FNO-5.dbf
datafile 6 switched to
datafile copy
input datafile copy
RECID=19 STAMP=984933731 file
name=/u01/12c/oracledb/oradata/data_D-ORCL_TS-USERS_FNO-6.dbf
datafile 7 switched to
datafile copy
input datafile copy
RECID=20 STAMP=984933731 file
name=/u01/12c/oracledb/oradata/data_D-ORCL_TS-SYSAUX_FNO-7.dbf
datafile 8 switched to
datafile copy
input datafile copy
RECID=21 STAMP=984933732 file name=/u01/12c/oracledb/oradata/data_D-ORCL_TS-SYSTEM_FNO-8.dbf
datafile 9 switched to
datafile copy
input datafile copy
RECID=22 STAMP=984933732 file
name=/u01/12c/oracledb/oradata/data_D-ORCL_TS-SYSAUX_FNO-9.dbf
datafile 10 switched to
datafile copy
input datafile copy
RECID=23 STAMP=984933732 file
name=/u01/12c/oracledb/oradata/data_D-ORCL_TS-USERS_FNO-10.dbf
datafile 11 switched to
datafile copy
input datafile copy
RECID=24 STAMP=984933732 file
name=/u01/12c/oracledb/oradata/data_D-ORCL_TS-SYSTEM_FNO-11.dbf
datafile 12 switched to
datafile copy
input datafile copy
RECID=25 STAMP=984933733 file
name=/u01/12c/oracledb/oradata/data_D-ORCL_TS-SYSAUX_FNO-12.dbf
datafile 13 switched to
datafile copy
input datafile copy
RECID=26 STAMP=984933733 file name=/u01/12c/oracledb/oradata/data_D-ORCL_TS-USERS_FNO-13.dbf
released channel: t1
RMAN>
now rename the redo log
file
first determine the redo
log file location
select member from
v$logfile;
MEMBER
--------------------------------------------------------------------------------
/u01/12c/oracledb/oradata/ORCL/onlinelog/o1_mf_3_fp6rmzho_.log
/u01/12c/oracledb/fast_recovery_area/ORCL/onlinelog/o1_mf_3_fp6rmzkn_.log
/u01/12c/oracledb/oradata/ORCL/onlinelog/o1_mf_2_fp6rmsyf_.log
/u01/12c/oracledb/fast_recovery_area/ORCL/onlinelog/o1_mf_2_fp6rmt2k_.log
/u01/12c/oracledb/oradata/ORCL/onlinelog/o1_mf_1_fp6rmmmf_.log
/u01/12c/oracledb/fast_recovery_area/ORCL/onlinelog/o1_mf_1_fp6rmmpr_.log
RMAN> alter database
rename file '/u01/12c/oracledb/oradata/ORCL/onlinelog/o1_mf_3_fp6rmzho_.log' to
'/u01/12c/oracledb/oradata/o1_mf_3_fp6rmzho_.log';
Statement processed
RMAN> alter database
rename file
'/u01/12c/oracledb/fast_recovery_area/ORCL/onlinelog/o1_mf_3_fp6rmzkn_.log' to
'/u01/12c/oracledb/oradata/o1_mf_3_fp6rmzkn_.log';
Statement processed
RMAN> alter database
rename file '/u01/12c/oracledb/oradata/ORCL/onlinelog/o1_mf_2_fp6rmsyf_.log' to
'/u01/12c/oracledb/oradata/o1_mf_2_fp6rmsyf_.log';
Statement processed
RMAN> alter database
rename file
'/u01/12c/oracledb/fast_recovery_area/ORCL/onlinelog/o1_mf_2_fp6rmt2k_.log' to
'/u01/12c/oracledb/oradata/o1_mf_2_fp6rmt2k_.log';
Statement processed
RMAN> alter database
rename file '/u01/12c/oracledb/oradata/ORCL/onlinelog/o1_mf_1_fp6rmmmf_.log' to
'/u01/12c/oracledb/oradata/o1_mf_1_fp6rmmmf_.log';
Statement processed
RMAN> alter
database rename file '/u01/12c/oracledb/fast_recovery_area/ORCL/onlinelog/o1_mf_1_fp6rmmpr_.log'
to '/u01/12c/oracledb/oradata/o1_mf_1_fp6rmmpr_.log';
Statement processed
RMAN>
now recover the database
connected to target
database: ORCL (DBID=1510897456, not open)
RMAN> set decryption
identified by "welcome123";
executing command: SET
decryption
using target database
control file instead of recovery catalog
RMAN> run
2> {
3> allocate channel
t1 type 'SBT_TAPE' PARMS 'SBT_LIBRARY=/home/oracle/lib/libopc.so ENV=(OPC_PFILE=/u01/app/oracle/ORCLuct/12.1.0/dbhome_1/dbs/opcORCL.ora)';
4> recover database;
5> }
allocated channel: t1
channel t1: SID=12
device type=SBT_TAPE
channel t1: Oracle
Database Backup Service Library VER=12.2.0.2
Starting recover at
23-AUG-18
starting media recovery
channel t1: starting
archived log restore to default destination
channel t1: restoring
archived log
archived log thread=1
sequence=18
channel t1: reading from
backup piece 07taphf1_1_1
channel t1: piece
handle=07taphf1_1_1 tag=TAG20180817T124937
channel t1: restored
backup piece 1
channel t1: restore
complete, elapsed time: 00:00:03
archived log file
name=/u03/app/oracle/fast_recovery_area/ORCL/archivelog/2018_08_23/o1_mf_1_18_fqxsmb6c_.arc
thread=1 sequence=18
channel default:
deleting archived log(s)
archived log file
name=/u03/app/oracle/fast_recovery_area/ORCL/archivelog/2018_08_23/o1_mf_1_18_fqxsmb6c_.arc
RECID=5 STAMP=984934378
unable to find archived
log
archived log thread=1
sequence=19
released channel: t1
RMAN-00571:
===========================================================
RMAN-00569:
=============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571:
===========================================================
RMAN-03002: failure of
recover command at 08/23/2018 16:53:01
RMAN-06054: media
recovery requesting unknown archived log for thread 1 with sequence 19 and
starting SCN of 1850362
RMAN> alter database
open resetlogs;
Statement processed
RMAN> select
open_mode from v$database;
OPEN_MODE
--------------------
READ WRITE
RMAN>
Query the table
select count(1) from
sam;
COUNT(1)
----------
89384
Thus, we have now have
successfully performed a disaster recovery of on-premises database to the cloud
using RMAN backups stored in Oracle Cloud Backup Storage.
This blog nicely explain cloud disaster and recovery. For all business on cloud must have cloud disaster recovery backup. This is helpful in condition of disaster and recovery of data. Thanks for sharing
ReplyDeleteThanks for sharing this useful article. Are you searching the correct partner to check Database Backup and Restore services? Try this company Database Backup and Restore services in usa
ReplyDeleteReally very interesting Post. Thanks for sharing
ReplyDeleteDisaster Recovery
I really appreciate the detailed information on professional cloud recovery. It was really helpful for me since I was desperately looking for these information.
ReplyDeleteNice article.
ReplyDeleteJava classes in Pune