Please see my other blog for Oracle EBusiness Suite Posts - EBMentors

Search This Blog

Note: All the posts are based on practical approach avoiding lengthy theory. All have been tested on some development servers. Please don’t test any post on production servers until you are sure.

Sunday, March 13, 2011

RMAN Backup using Netbackup

After Netbackup configuration on the Oracle Server, you can use rman to take backup on tape.


RUN{
ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE';
SEND 'NB_ORA_CLIENT=DB1, NB_ORA_SERV=nb1';
CROSSCHECK BACKUP;
CROSSCHECK ARCHIVELOG ALL;
BACKUP DATABASE PLUS ARCHIVELOG DELETE INPUT TAG Daily_HOME_tapebkp;
BACKUP VALIDATE DATABASE;
RELEASE CHANNEL ch00;
}

SET ORACLE_SID=HOME1
set day=%date:~0,3%
set mm=%date:~4,2%
set dd=%date:~7,2%
set yy=%date:~-4%
rman target sys/password CMDFILE=D:\Home_Backup\rmanrelated\Scripts\netbackup\Backup_Full_rman_nbu.rcv LOG=D:\Home_Backup\rmanrelated\Scripts\netbackup\Backup_Full_rman_nbu_%yy%%mm%%dd%.log

Log file


Recovery Manager: Release 10.2.0.4.0 - Production on Sat Mar 12 14:52:57 2011

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

connected to target database: HOME (DBID=2776620622)

RMAN> RUN{
2> ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE';
3> SEND 'NB_ORA_CLIENT=DB1, NB_ORA_SERV=nb1';
4> CROSSCHECK BACKUP;
5> CROSSCHECK ARCHIVELOG ALL;
6> BACKUP DATABASE PLUS ARCHIVELOG DELETE INPUT TAG Daily_HOME_tapebkp;
7> BACKUP VALIDATE DATABASE;
8> RELEASE CHANNEL ch00;
9> }
10>
using target database control file instead of recovery catalog
allocated channel: ch00
channel ch00: sid=1878 instance=home1 devtype=SBT_TAPE
channel ch00: Veritas NetBackup for Oracle - Release 7.0 (20100707)

sent command to channel: ch00

crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=E:\HOMERMANBACKUP\K8M6GV7O_1_1 recid=2181 stamp=745045240
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=E:\HOMERMANBACKUP\K9M6GVE5_1_1 recid=2182 stamp=745045446
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=+ORAFLASH/home/autobackup/2011_03_06/s_745045447.1555.745045447 recid=2183 stamp=745045447
Crosschecked 3 objects


validation succeeded for archived log
archive log filename=+ORAFLASH/home/archivelog/2011_03_06/thread_1_seq_5077.2425.745065259 recid=8924 stamp=745065259
validation succeeded for archived log
archive log filename=+ORAFLASH/home/archivelog/2011_03_06/thread_1_seq_5078.2414.745075015 recid=8925 stamp=745075015
.......
Crosschecked 250 objects



Starting backup at 12-MAR-11
current log archived
channel ch00: starting archive log backupset
channel ch00: specifying archive log(s) in backup set
input archive log thread=2 sequence=4067 recid=9038 stamp=745244219
input archive log thread=2 sequence=4068 recid=9039 stamp=745244285
input archive log thread=2 sequence=4069 recid=9040 stamp=745244375
channel ch00: starting piece 1 at 12-MAR-11
channel ch00: finished piece 1 at 12-MAR-11
piece handle=kqm71s73_1_1 tag=DAILY_HOME_TAPEBKP comment=API Version 2.0,MMS Version 5.0.0.0
channel ch00: backup set complete, elapsed time: 00:03:46
channel ch00: deleting archive log(s)
archive log filename=+ORAFLASH/home/archivelog/2011_03_08/thread_2_seq_4067.2912.745244215 recid=9038 stamp=745244219
channel ch00: starting archive log backupset
channel ch00: specifying archive log(s) in backup set
input archive log thread=2 sequence=4024 recid=8980 stamp=745240887
input archive log thread=2 sequence=4025 recid=8982 stamp=745240939
channel ch00: starting piece 1 at 12-MAR-11
channel ch00: finished piece 1 at 12-MAR-11
piece handle=krm71se7_1_1 tag=DAILY_HOME_TAPEBKP comment=API Version 2.0,MMS Version 5.0.0.0
channel ch00: backup set complete, elapsed time: 00:02:27
channel ch00: deleting archive log(s)
archive log filename=+ORAFLASH/home/archivelog/2011_03_08/thread_2_seq_4024.2444.745240887 recid=8980 stamp=745240887
channel ch00: starting archive log backupset
channel ch00: specifying archive log(s) in backup set
input archive log thread=1 sequence=5141 recid=9129 stamp=745286175
input archive log thread=1 sequence=5142 recid=9130 stamp=745293907
channel ch00: starting piece 1 at 12-MAR-11
channel ch00: finished piece 1 at 12-MAR-11
piece handle=ksm71sis_1_1 tag=DAILY_HOME_TAPEBKP comment=API Version 2.0,MMS Version 5.0.0.0
channel ch00: backup set complete, elapsed time: 00:02:26
channel ch00: deleting archive log(s)
archive log filename=+ORAFLASH/home/archivelog/2011_03_08/thread_1_seq_5141.2724.745286175 recid=9129 stamp=745286175
archive log filename=+ORAFLASH/home/archivelog/2011_03_09/thread_1_seq_5142.2720.745293907 channel ch00: starting archive log backupset
channel ch00: specifying archive log(s) in backup set
input archive log thread=2 sequence=4111 recid=9096 stamp=745248168
input archive log thread=2 sequence=4112 recid=9098 stamp=745248218
channel ch00: starting piece 1 at 12-MAR-11
channel ch00: finished piece 1 at 12-MAR-11
piece handle=ktm71snh_1_1 tag=DAILY_HOME_TAPEBKP comment=API Version 2.0,MMS Version 5.0.0.0
channel ch00: backup set complete, elapsed time: 00:01:56
channel ch00: deleting archive log(s)
archive log filename=+ORAFLASH/home/archivelog/2011_03_08/thread_2_seq_4111.2199.745248167 recid=9096 stamp=745248168
archive log filename=+ORAFLASH/home/archivelog/2011_03_08/thread_2_seq_4112.2331.745248217 recid=9098 stamp=745248218
channel ch00: starting archive log backupset
channel ch00: specifying archive log(s) in backup set
input archive log thread=1 sequence=5077 recid=8924 stamp=745065259
input archive log thread=1 sequence=5078 recid=8925 stamp=745075015
channel ch00: starting piece 1 at 12-MAR-11
channel ch00: finished piece 1 at 12-MAR-11
piece handle=kum71sr7_1_1 tag=DAILY_HOME_TAPEBKP comment=API Version 2.0,MMS Version 5.0.0.0
channel ch00: backup set complete, elapsed time: 00:01:26
channel ch00: deleting archive log(s)
archive log filename=+ORAFLASH/home/archivelog/2011_03_06/thread_1_seq_5077.2425.745065259 recid=8924 stamp=745065259
Finished backup at 12-MAR-11

Starting backup at 12-MAR-11
channel ch00: starting full datafile backupset
channel ch00: specifying datafile(s) in backupset
input datafile fno=00009 name=+ORADATA/home/datafile/home_ts03.dbf
input datafile fno=00005 name=+ORADATA/home/datafile/system02.dbf
input datafile fno=00017 name=+ORADATA/home/datafile/undotbs02.dbf
input datafile fno=00006 name=+ORADATA/home/datafile/home_ts02.dbf
input datafile fno=00004 name=+ORADATA/home/datafile/sysaux02.dbf
input datafile fno=00002 name=+ORADATA/home/datafile/undotbs01.dbf
input datafile fno=00001 name=+ORADATA/home/datafile/system01.dbf
input datafile fno=00013 name=+ORADATA/home/datafile/home_ts04.dbf
input datafile fno=00014 name=+ORADATA/home/datafile/home_ts05.dbf
input datafile fno=00015 name=+ORADATA/home/datafile/homelog01.dbf
input datafile fno=00016 name=+ORADATA/home/datafile/homelog02.dbf
input datafile fno=00007 name=+ORADATA/home/datafile/examcont01.dbf
input datafile fno=00010 name=+ORADATA/home/datafile/sysaux02_2.dbf
input datafile fno=00012 name=+ORADATA/home/datafile/undotbs2.1885.719758907
input datafile fno=00003 name=+ORADATA/home/datafile/users01.dbf
input datafile fno=00008 name=+ORADATA/home/datafile/exam1425_01.dbf
input datafile fno=00011 name=+ORADATA/home/datafile/system02_2.dbf
input datafile fno=00019 name=+ORADATA/home/datafile/recop1.1878.743860421
input datafile fno=00018 name=+ORADATA/home/datafile/test_netbkup.dbf
channel ch00: starting piece 1 at 12-MAR-11
channel ch00: finished piece 1 at 12-MAR-11
piece handle=kvm71stv_1_1 tag=TAG20110312T150535 comment=API Version 2.0,MMS Version 5.0.0.0
channel ch00: backup set complete, elapsed time: 00:12:45
Finished backup at 12-MAR-11

Starting backup at 12-MAR-11
current log archived
channel ch00: starting archive log backupset
channel ch00: specifying archive log(s) in backup set
input archive log thread=1 sequence=5174 recid=9176 stamp=745600702
input archive log thread=2 sequence=4148 recid=9177 stamp=745600703
channel ch00: starting piece 1 at 12-MAR-11
channel ch00: finished piece 1 at 12-MAR-11
piece handle=l0m71tm6_1_1 tag=DAILY_HOME_TAPEBKP comment=API Version 2.0,MMS Version 5.0.0.0
channel ch00: backup set complete, elapsed time: 00:01:06
channel ch00: deleting archive log(s)
archive log filename=+ORAFLASH/home/archivelog/2011_03_12/thread_1_seq_5174.2728.745600703 recid=9176 stamp=745600702
archive log filename=+ORAFLASH/home/archivelog/2011_03_12/thread_2_seq_4148.2729.745600703 recid=9177 stamp=745600703
Finished backup at 12-MAR-11

Starting Control File and SPFILE Autobackup at 12-MAR-11
piece handle=c-2776620622-20110312-00 comment=API Version 2.0,MMS Version 5.0.0.0
Finished Control File and SPFILE Autobackup at 12-MAR-11

Starting backup at 12-MAR-11
channel ch00: starting full datafile backupset
channel ch00: specifying datafile(s) in backupset
input datafile fno=00009 name=+ORADATA/home/datafile/home_ts03.dbf
input datafile fno=00005 name=+ORADATA/home/datafile/system02.dbf
input datafile fno=00017 name=+ORADATA/home/datafile/undotbs02.dbf
input datafile fno=00006 name=+ORADATA/home/datafile/home_ts02.dbf
input datafile fno=00004 name=+ORADATA/home/datafile/sysaux02.dbf
input datafile fno=00002 name=+ORADATA/home/datafile/undotbs01.dbf
input datafile fno=00001 name=+ORADATA/home/datafile/system01.dbf
input datafile fno=00013 name=+ORADATA/home/datafile/home_ts04.dbf
input datafile fno=00014 name=+ORADATA/home/datafile/home_ts05.dbf
input datafile fno=00015 name=+ORADATA/home/datafile/homelog01.dbf
input datafile fno=00016 name=+ORADATA/home/datafile/homelog02.dbf
input datafile fno=00007 name=+ORADATA/home/datafile/examcont01.dbf
input datafile fno=00010 name=+ORADATA/home/datafile/sysaux02_2.dbf
input datafile fno=00012 name=+ORADATA/home/datafile/undotbs2.1885.719758907
input datafile fno=00003 name=+ORADATA/home/datafile/users01.dbf
input datafile fno=00008 name=+ORADATA/home/datafile/exam1425_01.dbf
input datafile fno=00011 name=+ORADATA/home/datafile/system02_2.dbf
input datafile fno=00019 name=+ORADATA/home/datafile/recop1.1878.743860421
input datafile fno=00018 name=+ORADATA/home/datafile/test_netbkup.dbf
channel ch00: backup set complete, elapsed time: 00:06:15
Finished backup at 12-MAR-11

released channel: ch00

Recovery Manager complete.



No comments: