This article was written by Skant Gupta and Joel Perez in Oracle OTN.

This method is based on the traditional backup/restore/recover database. It has been one of the methods most effective to migrate/move an Oracle Database from one host to another host or even in the same host. The advantages of this method are several, one of them is that the downtime normally is almost zero, depending on the archive redo log generation of the “On-prem” or source database.

The objective of this article is not highlight the typical advantages of the method, this is a very well known method, the objective of this article is to realise how we can use it to move a database to Cloud.

Please use following steps to migrate on-premise database to Oracle cloud.

Backup source Database

[oracle@PREMISE premise]$ rman target /

Recovery Manager: Release 11.2.0.4.0 - Production on Tue Aug 8 04:34:16 2017

Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.

connected to target database: ORCL (DBID=1478563967)

RMAN> run
{
allocate channel c1 type DISK FORMAT '/u01/bkp/premise/%d_FULL_C_DISK_%T_%s_%p';
allocate channel c2 type DISK FORMAT '/u01/bkp/premise/%d_FULL_C_DISK_%T_%s_%p';
allocate channel c3 type DISK FORMAT '/u01/bkp/premise/%d_FULL_C_DISK_%T_%s_%p';
allocate channel c4 type DISK FORMAT '/u01/bkp/premise/%d_FULL_C_DISK_%T_%s_%p';
BACKUP AS COMPRESSED BACKUPSET DATABASE PLUS ARCHIVELOG;
backup spfile format '/u01/bkp/premise/spfile_%d_%s_%T_dbid%I.rman';
backup current controlfile format '/u01/bkp/premise/Controlfile_%d_%T_dbid%I_s%s_p%p';
release channel c1;
release channel c2;
release channel c3;
release channel c4;
}

using target database control file instead of recovery catalog
allocated channel: c1
channel c1: SID=146 device type=DISK

allocated channel: c2
channel c2: SID=33 device type=DISK

allocated channel: c3
channel c3: SID=150 device type=DISK

allocated channel: c4
channel c4: SID=17 device type=DISK

 

Starting backup at 08-AUG-17
current log archived
skipping archived logs of thread 1 from sequence 7 to 8; already backed up
channel c1: starting compressed archived log backup set
channel c1: specifying archived log(s) in backup set
input archived log thread=1 sequence=9 RECID=9 STAMP=951453273
channel c1: starting piece 1 at 08-AUG-17
channel c1: finished piece 1 at 08-AUG-17
piece handle=/u01/bkp/premise/ORCL_FULL_C_DISK_20170808_9_1 tag=TAG20170808T043433 comment=NONE
channel c1: backup set complete, elapsed time: 00:00:01
Finished backup at 08-AUG-17

Starting backup at 08-AUG-17
channel c1: starting compressed full datafile backup set
channel c1: specifying datafile(s) in backup set
input datafile file number=00001 name=/u02/app/oracle/oradata/ORCL/system01.dbf
channel c1: starting piece 1 at 08-AUG-17
channel c2: starting compressed full datafile backup set
channel c2: specifying datafile(s) in backup set
input datafile file number=00002 name=/u02/app/oracle/oradata/ORCL/sysaux01.dbf
input datafile file number=00004 name=/u02/app/oracle/oradata/ORCL/users01.dbf
channel c2: starting piece 1 at 08-AUG-17
channel c3: starting compressed full datafile backup set
channel c3: specifying datafile(s) in backup set
input datafile file number=00005 name=/u02/app/oracle/oradata/ORCL/example01.dbf
input datafile file number=00003 name=/u02/app/oracle/oradata/ORCL/undotbs01.dbf
channel c3: starting piece 1 at 08-AUG-17
channel c3: finished piece 1 at 08-AUG-17
piece handle=/u01/bkp/premise/ORCL_FULL_C_DISK_20170808_12_1 tag=TAG20170808T043434 comment=NONE
channel c3: backup set complete, elapsed time: 00:00:07
channel c1: finished piece 1 at 08-AUG-17
piece handle=/u01/bkp/premise/ORCL_FULL_C_DISK_20170808_10_1 tag=TAG20170808T043434 comment=NONE
channel c1: backup set complete, elapsed time: 00:00:25
channel c2: finished piece 1 at 08-AUG-17
piece handle=/u01/bkp/premise/ORCL_FULL_C_DISK_20170808_11_1 tag=TAG20170808T043434 comment=NONE
channel c2: backup set complete, elapsed time: 00:00:25
Finished backup at 08-AUG-17

Starting backup at 08-AUG-17
current log archived
channel c1: starting compressed archived log backup set
channel c1: specifying archived log(s) in backup set
input archived log thread=1 sequence=10 RECID=10 STAMP=951453301
channel c1: starting piece 1 at 08-AUG-17
channel c1: finished piece 1 at 08-AUG-17
piece handle=/u01/bkp/premise/ORCL_FULL_C_DISK_20170808_13_1 tag=TAG20170808T043501 comment=NONE
channel c1: backup set complete, elapsed time: 00:00:01
Finished backup at 08-AUG-17

Starting backup at 08-AUG-17
channel c1: starting full datafile backup set
channel c1: specifying datafile(s) in backup set
including current SPFILE in backup set
channel c1: starting piece 1 at 08-AUG-17
channel c1: finished piece 1 at 08-AUG-17
piece handle=/u01/bkp/premise/spfile_ORCL_14_20170808_dbid1478563967.rman tag=TAG20170808T043502 comment=NONE
channel c1: backup set complete, elapsed time: 00:00:01
Finished backup at 08-AUG-17

Starting backup at 08-AUG-17
channel c1: starting full datafile backup set
channel c1: specifying datafile(s) in backup set
including current control file in backup set
channel c1: starting piece 1 at 08-AUG-17
channel c1: finished piece 1 at 08-AUG-17
piece handle=/u01/bkp/premise/Controlfile_ORCL_20170808_dbid1478563967_s15_p1 tag=TAG20170808T043503 comment=NONE
channel c1: backup set complete, elapsed time: 00:00:01
Finished backup at 08-AUG-17

Starting Control File and SPFILE Autobackup at 08-AUG-17
piece handle=/u03/app/oracle/fast_recovery_area/ORCL/autobackup/2017_08_08/o1_mf_s_951453306_drlhvton_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 08-AUG-17

released channel: c1

released channel: c2

released channel: c3

released channel: c4

RMAN>

RMAN> exit

 

Recovery Manager complete.
[oracle@PREMISE premise]$

If you want to read rest to the article, go across this link :Migrating Databases to Oracle Cloud Using RMAN Backup

For More Detail , You can join us follow:

LinkedIn Group: Oracle Cloud DBAAS

Facebook Page: OracleHelp

Comments

  1. Pingback: Log Buffer #523: A Carnival of the Vanities for DBAs – Cloud Data Architect

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.