Forum Discussion

PARTHASARATHI_S's avatar
9 years ago

Schedule dependency in netbackup.

Hi Experts,

How to create a dependency between 2 schedules in 2 separate policy in netbackup.

I have policy A and policy B. Both have 2 monthly full backup schedules. I want schedule in policy B will trigger , once schedule in policy A is complete every time.

  • @Nicolai:

    You can't - Netbackup has no options to create dependencies : i am not fully agree to the statement, as we have other backup servers, where one policy trigger another policy.

     

    Nicolai is correct, there is no built in method in NBU to run a scedule based on the outcome of another schedule.

    It 'might' be possible using the *end scripts, but this is a 'custom' method (eg. you have to manually write the script) as opposed to a built in function or feature.

     

19 Replies

  • If you have it working on other backup servers then copy the process that they use.

    If it is the same client with multiple streams why not just put all streams into one policy and limit the number of jobs that it can run - would that not be suitable .. if you set the stream order and numbers used you should be able to acheive what you want?

     

  • It's called at the end of all backup jobs - you need put some IF logic in it.
  • I can't remember if backup_exit_notify has some "STREAM*" variables made available to it...

    ...so maybe something like...

    if the backup status = 0
    then
      if the policy name = "blah"
      then
        if the client name = "blah"
        then
          if the stream_mumber = stream_max
          then
            submit new job
          fi
        fi
      fi
    fi

    ...but if there are no stream numbers passed to backup exit notify then you may need to single stream the job from policyA.

  • Hi Mark, i have copied the script from other server, hope this will work out on sunday backup.

    If that work then i am well and good. Otherwise i may need some suggestions to sequence streams inside policy.

    I will keep posted on monday.

  • FYI - backup exit notify is submitted/called at the end of all backup jobs... and so any code in it must be able to handle being called many times and concurrently...

    ...and so any use of any temporary files within the script will need to use a random number or two ;) and maybe the time too in the file names...

    ...and don't forget to make the script clean-up any temporary files that you use... just before it exits (for any reason)...

    ...and this script is fired and forgotten, and is not waited for, and its exit status is not checked, and does not have to run silently like some of the other notify scripts.

  • What you could do, to see what parameters and environment variables are available at instantiation time... is to put:

    env >"/tmp/b-e-n-$$-env.txt"
    set >"/tmp/b-e-n-$$-set.txt"
    

    ...in the script to see what variables are available when backup_exit_notify is actually running.

    .

    ...but don't leave those statements in there for too long... otherwise your /tmp folder will fill up with possibly thousands of little text files.

  • -i parameter only work on a master server or a client added to the master servers server list (last not really recommended for security reasons).

  • @Nicolai:

    You can't - Netbackup has no options to create dependencies : i am not fully agree to the statement, as we have other backup servers, where one policy trigger another policy.

     

    Nicolai is correct, there is no built in method in NBU to run a scedule based on the outcome of another schedule.

    It 'might' be possible using the *end scripts, but this is a 'custom' method (eg. you have to manually write the script) as opposed to a built in function or feature.