07-18-2012 07:09 AM
Hello all,
I work as a DBA and have NO vizibility into the netbackup Piece. The only vizibility that i have from Netbackup end is console where i can manually kick of the backup. But my questions is with regards to passing in a variable. Currently we have net backup setup (Veritas NetBackup for Oracle - Release 7.1) and the netbackup Admin said netbackup CANNOT take any variables... so lets say i have 2 database on my server, then i need 2 scripts for it....currently netbackup take the below script(backup_DB1.ksh) and that script in truns call another script(rman_backup.ksh) which passes in the variable(DB1)...and then same for DB2
07-18-2012 07:27 AM
bpstart_notify script, example on the Master Server under netbackup/bin/goodies
# Parameters passed are: CLIENTNAME="$1" POLICYNAME="$2" SCHEDNAME="$3" SCHEDTYPE="$4"
also described in this old thread: https://www-secure.symantec.com/connect/forums/bpstartbpendnotify-script-and-multistreaming-about-do...
07-18-2012 11:18 PM
I think it's possible, but if you call Netbackup support, they won't do it for you. as they don't create/modify script for you.
For database backup, all netbackup use (most commonly) is also a script (.sh) at the database server end. So if you take a look into that backup script (for example Oracle RMAN):
/usr/openv/netbackup/ext/db_ext/oracle/samples/rman/hot_database_backup.sh
It is possible to specify what database instance to backup. For that, you can modify that script to read a environment variable value of what databases you want to backup, then simply set the environment variable before you run the backup.
07-19-2012 11:34 AM
Thank you for the comment but that would still require us to pass in a variable (that is the DB name)...so if we have 10 DB we can create a for loop to do that...but our problem is...if for watever reason one of the backup fails...that script(for loop) will read all of the DB again and back them up all over again.....and we want to avoid that....
we created 10 policy one of each DB and each policy is callings it own script, so if one fails we can just restart one instead of all 10 in a for loop....
07-19-2012 11:36 AM
the script you mentioned has the below...ORACLE_SID...so 10 DB will reach 10 different scripts of same kind just with different name....
07-19-2012 12:19 PM
That is probably the best way, especially if DB are large size.
07-19-2012 12:47 PM
YES, you can pass variables. But as indicated, mostly only the client, policy and schedule name.
I have policy1 that runs on the oracle SID, runs a script that uses uname to determine which VCS system the DB is on, and then calls the script with that client name - so if the DB is on system2 it uses policy2, if it is on system3 it calls policy3. That way it uses the correct storage which is fiber attached to the various servers.
NetBackup passes control of the RMAN backup to the RMAN scripts, and RMAN runs a series of user requested backups - which is why failures always end with error 6 and the DBA has to review the log file.
My RMAN backup ends with RMAN creating a new control file which I copy to a set area - then the RMAN script runs a seperate OS backup of that control file, so step one of restoring the DB is restoring the last good control file. A good tip!
07-19-2012 01:19 PM
how do you manage a system that has 10 SID on same box....do you just loop through /etc/oratab ?? if so what do you do if lets say backup for DB#5 fails and everything else worked?? if you run the policy again wouldnt in loop though etc/oratab and backup all other SID as well ?