cancel
Showing results for 
Search instead for 
Did you mean: 

Modifying template RMAN script

Bryan_w_cp
Level 3
Hi all,
 
i used to invoke netbackup of Oracle DB (RMAN)using crontab in unix. Until recently i switched to use NBU's generated  template to schedule and backup Oracle.
I made some changes to the template file db_.tpl, on the Backup archivelog part whereby i wan it to retain backed up archivelogs for 7 days and skip those already backed up.
 
# Backup Archived Logs
sql 'alter system archive log current';
ALLOCATE CHANNEL ch00
   TYPE 'SBT_TAPE';
SEND 'NB_ORA_CLIENT=MFMHQJDDB,NB_ORA_SERV=MFMHQJDDB';
BACKUP
   FORMAT 'arch-s%s-p%p-t%t'
   ARCHIVELOG
       ALL NOT BACKED UP;
   DELETE ARCHIVELOG UNTIL TIME 'SYSDATE - 7' BACKED UP 1 TIMES to device type
SBT_TAPE;
RELEASE CHANNEL ch00;
 
Each day when i checked the progress file (/usr/openv/netbackup/logs/user_ops/dbext/oracle), i notice it somehow dint delete those 7 days old archivelogs and worst even repeate the same backed up archivelog the day before, making them duplicate. Inside the progress file, when i look at the RMAN script, the changes i made was not there. Somehow i feel like NBU is not taking any ammendment to the script once it is generated.
 
Please help as my backup run longer and longer each day.
5 REPLIES 5

Yasuhisa_Ishika
Level 6
Partner Accredited Certified
Hi, Bryan
 
 Can you try to convert template to script with bpdbsbora?
 In my some experience, I believe that modified template sometimes does not take effect.
(I guess there are some limitaton of allowable keyward in template)
 
 Converted script will work file. Try it!Smiley Wink

Bryan_w_cp
Level 3

bpdbsbora -backup -g <script file name> -t <template name>

What actually does this do? i already have a working Full_backup.rman script (used previously) and Template Full_backup.tpl (generated by NBU but modified by me). So how do i use these on this command?

bpdbsbora -backup -g Full_backup.rman -t Full_backup.tpl

??

Message Edited by Bryan w cp on 03-25-200708:53 PM

Yasuhisa_Ishika
Level 6
Partner Accredited Certified
This command (bpdbsbora -backup -g <script file name> -t <template name> ) generates RMAN script that works as same as the template. My suggestion means that you will be back to the previous "script" configuration style.
If you have to use template with some reason(centerilized management, or etc), this does not help you, sorry.
 

Message Edited by Yasuhisa Itoh on 03-25-200709:55 PM

Bryan_w_cp
Level 3
can i use rman script instead of the template generated by NBU? Under the GUI, Backup Selections panel can i just point to a XXXX.rman? instead of XXXX.tpl?
 
i just wan to invoke the delete 7 days old and already backe-up archivelogs command.
 
plse help 

Yasuhisa_Ishika
Level 6
Partner Accredited Certified
RMAN scripts have to be placed on the client.
First, copy the script on the client host. Then you scpecify the script in Backup Selections with absolute path - you can not select it from list, just write its path on the box.
 
This could be the same way you do with your script previosly.