Forum Discussion

sswanstr's avatar
sswanstr
Level 3
17 years ago

notify scripts

I am trying to run 2 consecutive backups and am trying to determine the best way to accomplish this.  I am running a differential backup that starts via the NBU scheduler.  I want to start another FULL backup once this diff completes.  The policy is for a windows SAN media server and it's multi-streamed.  I think the best way to do this would be by using one of the notify scripts.  My issue is I don't know whether to use bpend_notify or backup_exit_notify.  Anyone able to help?
  • I was able to get it to work using the bpend_notify script and by splitting each stream into it's own policy (there were only 4 of them).  I created a bpend for each policy to call the full backup providing that the diff completed with a status of 0.

     

    I was not aware that the backup_exit_notify only worked on the master and that information was helpful.

     

    Thanks.

  • I'm assuming that the backups concerned are for the same client (doesn't matter if they are different policies).

     

    If so, then set the maximum streams for the client individually, master server properties, client attributes, add client name, set max streams to 1.  This way only one stream will ever be active, no matter how many jobs enter the queue for that particular client from however many policies.  Then all you have to do, is maybe use a priority on the policies to force order of execution - because if you're ever late with starting  your session onenight, the scheduler might decide to put (what you expect to be) the subsequent job on the queue first, and thus it would run first if all jobs had the same priority (because it has an earlier queue time).

     

    N.B. Perversley, NetBackup v6.5.2 actually has a bug - it ignores the max streams setting from the client attributes of the master server properties.   v6.5.1 does NOT have this bug, and it's supposedly fixed in v6.5.3 when this comes out (in a few weeks I believe).

  • Unfortunately we need to have multiple streams running at once for the client due to the way we have the backups setup.  I think I can get the backup_exit_notify to work (we've used a similar technique before).  My issue is that it doesn't look like the backup_exit_notify.cmd is even being called at all on this server.  Right now it's just the default script that comes with netbackup.  However, the output file that it's supposed to create (BACKUP_EXIT_CALLED) is not being created and I can't, for the life of me, determine why that is.  We are running 6.0 MP5 on a windows 2003 client/san media server.
  • backup_exit_notify runs on the master server only.  It is called (with a nowait) at the end of every single backup and duplication job.  The logic that you put in will have to be quite robust.  The issue with backup_exit_notify is that it recieves six basic parameters, and although some other variables are available (such as stream_count and stream_number) there isn't enough information to tie down any particular instance of backup_exit_notify invocation to its specific entry (job id) in the activity monitor.  i.e. you can never determine exactly which particular backup ob any given invocation relates to.  Sighs...

     

    IMHO, I'd look for another way.

     

    If the ordering of your jobs is critical then I would look at instead of relying on a schedule to fire your backups, use cron or a.n.other scheduler to run the backups (bpbackup with a wait for completion "-w hh:mm:ss") and test the return status to see if the backup worked before continuing with the next.

     

    If you use cron (Unix) or task scheduler (Win) on the master then you can use the "-i" option of bpbackup and get it to run any schedule type you want - i.e. it doesn't have to be a user mode (and therefore always full) schedule, i.e. you can fire cumulative and differential.

     

    But, if you want the client to fire for example an incremental schedule using the "-i" option of bpbackup, then you will have to make the client a server of the master, i.e. add the client name to the server list on the master.  But, this weakens your security and allows the client to administer the master (if someone uncrupulous were to copy some of the admin programs/executables to the client).

     

    HTH.

  • I was able to get it to work using the bpend_notify script and by splitting each stream into it's own policy (there were only 4 of them).  I created a bpend for each policy to call the full backup providing that the diff completed with a status of 0.

     

    I was not aware that the backup_exit_notify only worked on the master and that information was helpful.

     

    Thanks.