cancel
Showing results for 
Search instead for 
Did you mean: 

bpbackup in bpstart_notify scripts

liuyang
Level 6
Partner Accredited

Hi, my master server is NBU 7.0.1 on Windows 2008 R2. I have one client (windows 2003 sp2, NBU 7.0.1) and I configured two backup policies for this client. Assume the policies are A and B. I want policy A runs prior policy B. So I create a bpstart_notify script for policy B and put the bpbackup command in this script to start backup of policy A. But when it is running, I found the two jobs are running at the same time. My bpbackup command is something like below:

bpbackup -i -p policyA

What I want is: policy A run first, when it finishes, policy B starts to run. Is it possbile to do this with bpbackup scripts?  Anything wrong with my scripts?

Thanks in advance.

1 ACCEPTED SOLUTION

Accepted Solutions

watsons
Level 6

You 1st post said you want to have 2nd policy run right after the 1st policy completes.

Your 2nd post seems to imply you want both jobs (SQL & file backup) run together?

Anyway, the best is still to configure 2 different policies and have their schedule set accordingly (one after another), given that you know how long in max. duration the 1st policy would take.

I don't recommend using 2 bpbackup in a script and put a "wait mechanism" in between, because this could easily fall into other type of errors such as timeout or callback issue.

Other alternative, use EV policy type to protect EV environment. Probably better but you need license.

View solution in original post

6 REPLIES 6

Fr_d_ric_RIGAL
Level 5
Partner Accredited

Hi,

Why do you not use SLP for this?

Marianne
Level 6
Partner    VIP    Accredited Certified

bpbackup runs in the background. So, the backup will be submitted and the script will exit.

You can add -w (wait) to bpbackup, but anything taking longer than 5 minutes to complete should not be put into start_notify (5 minute timeout on this script - can be modified, but not recommended).

Please help us to understand why the one needs to run before the other and what the policy types are?

liuyang
Level 6
Partner Accredited

Hi RIGAL, how to use SLP to run two policies?

Hi Marianne, one policy is to back up SQL (SQL policy), the other is to back up file. I am trying to back up EV server. What I do is use bpstart_notify to put EV in read-only mode, then bpbackup to activate SQL backup. In EV backup, as I understand, SQL and file should be backed up togather when EV server is read-only mode. However, I only have one tape drive for EV server to use for backup. As a result, I cannot run the two jobs at the same time.

Marianne
Level 6
Partner    VIP    Accredited Certified

Enable multiplexing, multi-streaming and increase Max Job per Client to activate more than one simultaneous job.

watsons
Level 6

You 1st post said you want to have 2nd policy run right after the 1st policy completes.

Your 2nd post seems to imply you want both jobs (SQL & file backup) run together?

Anyway, the best is still to configure 2 different policies and have their schedule set accordingly (one after another), given that you know how long in max. duration the 1st policy would take.

I don't recommend using 2 bpbackup in a script and put a "wait mechanism" in between, because this could easily fall into other type of errors such as timeout or callback issue.

Other alternative, use EV policy type to protect EV environment. Probably better but you need license.

J_H_Is_gone
Level 6

The difference is that a normal schedule STARTS with NB.

Where a User schedule STARTS with the Client.

you can create a user schedule in the policy, with your client in the policy.  The schedule will have the retention you need, if you need more than one you will need to create 2 user schedules.

Then on your server create a script and put it in cron(unix) or the job scheduler(windows)

In the script

do your thing to the database

so some kind of check that the database is in the correct state

A) use the bpbackup command to do the backup (specifying the policy and the schedule)

do some checking that the backup ran ok, if failed send an email.

B) use the bpbackup command to do the second backup that you want.

do some checking that the backup ran ok, if failed send an email.