Skip to main content

Restoring Oracle Backup to a New Server

Nobody wants database server to crash, but if it happens most recent backup has to be restored on a newly replaced server. There are some requirements before the restoring operation. First, a server oracle software installed on it. Second, it makes restore operation easy that the same folder structure as the old server. Third, autobackup feature must be enabled at the old server. Last but not least, DBID of the old database.

$ rman target /
Recovery Manager: Release 10.2.0.5.0 – Production on Thu Feb 24 11:42:26 2011
Copyright (c) 1982, 2007, Oracle.  All rights reserved.
connected to target database (not started)

RMAN> startup nomount;
startup failed: ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file ‘/u01/app/oracle/product/10.2.0/db_1/dbs/initorcl.ora’
starting Oracle instance without parameter file for retrival of spfile
Oracle instance started
Total System Global Area     159383552 bytes
Fixed Size                     2094736 bytes
Variable Size                 67111280 bytes
Database Buffers              83886080 bytes
Redo Buffers                   6291456 bytes

RMAN> SET DBID=3044472081;
executing command: SET DBID

RMAN> run
2> {
3> allocate channel t1 type 'SBT_TAPE' parms="ENV=(NB_ORA_CLIENT=tedtdb,NB_ORA_SERV=bckserver)";
4> restore spfile from autobackup;
release channel t1;
5> 6> }
using target database control file instead of recovery catalog
allocated channel: t1
channel t1: sid=36 devtype=SBT_TAPE
channel t1: Veritas NetBackup for Oracle – Release 7.0 (2010070800)
Starting restore at 24-FEB-11
channel t1: looking for autobackup on day: 20110224
channel t1: looking for autobackup on day: 20110223
channel t1: looking for autobackup on day: 20110222
channel t1: autobackup found: c-3044472081-20110222-05
channel t1: SPFILE restore from autobackup complete
Finished restore at 24-FEB-11
released channel: t1

RMAN> shutdown immediate;
Oracle instance shut down

RMAN> startup nomount;
connected to target database (not started)
Oracle instance started
Total System Global Area    3221225472 bytes
Fixed Size                     2099752 bytes
Variable Size               1560282584 bytes
Database Buffers            1644167168 bytes
Redo Buffers                  14675968 bytes

RMAN> run
2> {
3> allocate channel t2 type 'SBT_TAPE' parms="ENV=(NB_ORA_CLIENT=tedtdb,NB_ORA_SERV=bckserver)";
restore controlfile from autobackup;
release channel t2;
}4> 5> 6>
allocated channel: t2
channel t2: sid=321 devtype=SBT_TAPE
channel t2: Veritas NetBackup for Oracle – Release 7.0 (2010070800)
Starting restore at 24-FEB-11
channel t2: looking for autobackup on day: 20110224
channel t2: looking for autobackup on day: 20110223
channel t2: looking for autobackup on day: 20110222
channel t2: autobackup found: c-3044472081-20110222-05
channel t2: control file restore from autobackup complete
output filename=/database/oradata/orcl/control01.ctl
output filename=/database/oradata/orcl/control02.ctl
output filename=/database/oradata/orcl/control03.ctl
Finished restore at 24-FEB-11
released channel: t2

RMAN> alter database mount;
database mounted

RMAN> run
2> {
3> allocate channel t3 type 'SBT_TAPE' parms="ENV=(NB_ORA_CLIENT=tedtdb,NB_ORA_SERV=bckserver)";
4> restore database;
5> recover database;
6> release channel t3;
7> }
allocated channel: t3
channel t3: sid=321 devtype=SBT_TAPE
channel t3: Veritas NetBackup for Oracle – Release 7.0 (2010070800)
Starting restore at 24-FEB-11
channel t3: starting datafile backupset restore
channel t3: specifying datafile(s) to restore from backup set
restoring datafile 00004 to /database/oradata/orcl/users01.dbf
restoring datafile 00005 to /database/oradata/orcl/test01.dbf
channel t3: reading from backup piece bk_329_1_743772421
channel t3: restored backup piece 1
piece handle=bk_329_1_743772421 tag=HOT_DB_BK_LEVEL0
channel t3: restore complete, elapsed time: 00:32:39
channel t3: starting datafile backupset restore
channel t3: specifying datafile(s) to restore from backup set
restoring datafile 00001 to /database/oradata/orcl/system01.dbf
restoring datafile 00002 to /database/oradata/orcl/undotbs01.dbf
restoring datafile 00003 to /database/oradata/orcl/sysaux01.dbf
channel t3: reading from backup piece bk_330_1_743772421
channel t3: restored backup piece 1
piece handle=bk_330_1_743772421 tag=HOT_DB_BK_LEVEL0
channel t3: restore complete, elapsed time: 00:02:55
Finished restore at 24-FEB-11
Starting recover at 24-FEB-11
starting media recovery
channel t3: starting archive log restore to default destination
channel t3: restoring archive log
archive log thread=1 sequence=102
channel t3: reading from backup piece al_333_1_743772654
channel t3: restored backup piece 1
piece handle=al_333_1_743772654 tag=TAG20110222T113054
channel t3: restore complete, elapsed time: 00:00:37
channel t3: starting archive log restore to default destination
channel t3: restoring archive log
archive log thread=1 sequence=101
channel t3: reading from backup piece al_332_1_743772654
channel t3: restored backup piece 1
piece handle=al_332_1_743772654 tag=TAG20110222T113054
channel t3: restore complete, elapsed time: 00:00:36
archive log filename=/fra/_1_101_743451264.dbf thread=1 sequence=101
archive log filename=/fra/_1_102_743451264.dbf thread=1 sequence=102
unable to find archive log
archive log thread=1 sequence=103
released channel: t3
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 02/24/2011 13:59:15
RMAN-06054: media recovery requesting unknown log: thread 1 seq 103 lowscn 40854103

RMAN> alter database open resetlogs;
database opened

Comments

Popular posts from this blog

Creating Multiple VLANs over Bonding Interfaces with Proper Routing on a Centos Linux Host

In this post, I am going to explain configuring multiple VLANs on a bond interface. First and foremost, I would like to describe the environment and give details of the infrastructure. The server has 4 Ethernet links to a layer 3 switch with names: enp3s0f0, enp3s0f1, enp4s0f0, enp4s0f1 There are two bond interfaces both configured as active-backup bond0, bond1 enp4s0f0 and enp4s0f1 interfaces are bonded as bond0. Bond0 is for making ssh connections and management only so corresponding switch ports are not configured in trunk mode. enp3s0f0 and enp3s0f1 interfaces are bonded as bond1. Bond1 is for data and corresponding switch ports are configured in trunk mode. Bond0 is the default gateway for the server and has IP address 10.1.10.11 Bond1 has three subinterfaces with VLAN 4, 36, 41. IP addresses are 10.1.3.11, 10.1.35.11, 10.1.40.11 respectively. Proper communication with other servers on the network we should use routing tables. There are three

3 Node (Master Slave Slave) Redis Cluster with Sentinel

It is possible to make your Redis cluster Fault Tolerant and Highly Available by building a replica set and then monitor these nodes using sentinel for automatic failover. I am going to give an example setup to explain it. The structure is built with three nodes running one as a master and two as slaves. Master Node: (Centos 7.2) 192.168.1.11 Slave1 Node: (Centos 7.2) 192.168.1.12 Slave2 Node: (Centos 7.2) 192.168.1.13 Edit System settings on each node: /etc/sysctl.conf Disable transparent hugepage (transparent_hugepage=never) on each node: /etc/default/grub Apply grub config and reboot each node: Master Node: /etc/redis/6379.conf Slave1 Node: /etc/redis/6379.conf Slave2 Node: /etc/redis/6379.conf Master Node: /etc/redis/sentinel.conf Slave1 Node: /etc/redis/sentinel.conf Slave2 Node: /etc/redis/sentinel.conf Each Node: /etc/systemd/system/multi-user.target.wants/redis-server.service Each Node: /etc/