Running a script - Veritas Net Backup

This is a discussion on Running a script - Veritas Net Backup ; Is there a way to have 3.3 run a script before beginning the backup? I need to shutdown the DB and restart it when the backup is finished. Thanks frankr@metmtg.com...

+ Reply to Thread
Results 1 to 5 of 5

Thread: Running a script

  1. Running a script

    Is there a way to have 3.3 run a script before beginning the backup? I need
    to shutdown the DB and restart it when the backup is finished.
    Thanks
    frankr@metmtg.com



  2. Re: Running a script


    I am using 3.2 but I assume that this applies to 3.3 as well.
    There should be sample scripts in the
    netbackup/bin/goodies
    directory. There are bpstart_notify and a bpend_notify scripts
    there. You can copy those scripts to the netbackup/bin
    directory and rename them to
    bpstart_notify.

    "Frank Rueff" wrote:
    >Is there a way to have 3.3 run a script before beginning the backup? I need
    >to shutdown the DB and restart it when the backup is finished.
    >frankr@metmtg.com



  3. Re: Running a script


    Sorry about that; I posted my response by mistake...

    I am using 3.2 but I assume that this applies to 3.3 as well.
    There should be sample scripts in the
    netbackup/bin/goodies
    directory. There are bpstart_notify and a bpend_notify scripts
    there. You can copy those scripts to the netbackup/bin
    directory and rename them to
    bpstart_notify. and bpend_notify.
    You will have to modify the scripts to do what you want but
    they are a good starting point.

    HTH,
    Dan


    >"Frank Rueff" wrote:
    >>Is there a way to have 3.3 run a script before beginning the backup? I

    need
    >>to shutdown the DB and restart it when the backup is finished.
    >>frankr@metmtg.com



  4. Re: Running a script


    "Frank Rueff" wrote:
    >Is there a way to have 3.3 run a script before beginning the backup? I need
    >to shutdown the DB and restart it when the backup is finished.
    >Thanks
    >frankr@metmtg.com
    >
    >Dan is correct you are best using bpstart_notify & bpend_notify


    try adding something like this to bpstart_notify
    (assuming it's an oracle DB you are closing !)

    the SCHEDNAME has to be in the format SID-friday
    the script then reads the oratab checks it is an instance then closes it
    down if it is

    (then add the open database stuff to bpend_notify)

    # setting logfile value
    logfile=/usr/openv/netbackup/bin/logs/$3.log
    #
    # checking to see if the schedule is an oracle instance
    # i.e. does it exist in /etc/oratab
    #
    instance=`echo $3 | cut -f1 -d"-" `

    if grep "^$instance:" /etc/oratab > $logfile 2>&1
    then
    /bin/su oracle -c /db_b/app/oracle/product/7.3.3/bin/dbshut $instance >>
    $logfile 2>&1
    fi

    be aware that if your scripts take sometime you will have to increase the
    BPEND_TIMEOUT value in your bp.conf

    also if the scripts produce an output to stdout the schedule may hang !

    regards

    Alick

  5. Re: Running a script


    At version 3.2, we experienced a problem with hacking the bp_start/end_notify
    scripts to shutdown/startup the oracle database for a particular Class.
    It would appear that if you run a backup in muliple streams, then the start&end
    scripts will execute around each stream issued. This means that the first
    backup stream to complete will reload the database, whilst the other streams
    continue to backup. This in effect makes the backup un-usable for recovery
    purposes. I believe Veritas have raised a tech-note about this incident
    and I feel it may be something which you ought to be aware of.


    "Frank Rueff" wrote:
    >Is there a way to have 3.3 run a script before beginning the backup? I need
    >to shutdown the DB and restart it when the backup is finished.
    >Thanks
    >frankr@metmtg.com
    >
    >



+ Reply to Thread