cancel
Showing results for 
Search instead for 
Did you mean: 

bpstart_notify and bpend_notify not getting executed

Ashish_86
Level 4

Hello ,

 

We are doing a offline SAP backup using the script sap_offline_backup. The backups are running fine if the application team stops the SAP application and then the offline scripts bring the DB down and then backup up once the backup has been done.

We are trying to automate the SAP application shutdown by configuring the scripts : bpstart_notify and bpend_notify. The scripts are running fine when they are run from the netbackup server and are recycling the SAP as required. But when we try to fire the offline backup , netbackup does not execute the bpstart_notify and bpend_notify ( on its own as it should do ) and there are no logs generated related to it in bpbkar. Can anyone of you please suggest what could be the issue in this case.

Thanks

12 REPLIES 12

Marianne
Level 6
Partner    VIP    Accredited Certified

NBU agent backups do not call notify scripts.

 

I'm missing something here - the sap_offline_backup script contains the following :

CMD_LINE="$SAP_ENV brbackup -c -d util_file -t offline -m all"

Surely the '-t offline' will take the database offline? Not so?

Ashish_86
Level 4

Yeah it will take the DB offline but we need to take the SAP down as well and thats why we want to put the startsap and stopsap commands in the bpstart_notify and bpend_notify

Nicolai
Moderator
Moderator
Partner    VIP   

Why don't you use online backup instead ?.

It will save you a lot of trouble e.g. when a delayed backup doesn't bring up SAP to production hours. Personaly I haven't used offline backup the last 10 years and never had issues.

 

Ashish_86
Level 4

We are using online backups also but the customer requires offline backups happening as well . For that we have created two files in /usr/openv/netbackup/bin directory which are : bpstart_notify and bpend_notify in which we have put the commands to stop and start SAP . These 2 scripts are working fine when I execute them from netbackup manually, but the issue is that the netbackup is not running these 2 files before and after the backup as it should be .

CRZ
Level 6
Employee Accredited Certified

As Marianne already told you, these scripts are not called during a SAP backup - because bpbkar isn't getting called; brbackup is.

I reckon you could alter sap_offline_backup itself, inserting the desired commands before and after what's in there now, but I am the last person who should be offering script advice.  Perhaps someone else has done this successfully and can share their script?

Nicolai
Moderator
Moderator
Partner    VIP   

As I see it this backup solution it's a mix of two things:

1: A "real" SAP brbackup -offline backup (with backint)

2: A "poor man" offline backup (without backint) where SAP is shutdown completely

Using the bpstart_notify and bpend_notify script indicate to me you are using option 2 for offline backups. Is this correct understood Ashish_86 ?

RiaanBadenhorst
Moderator
Moderator
Partner    VIP    Accredited Certified

Hi,

 

I think there is a bit of confusion here. Ashish says he wants to bring down SAP, not the DB when he's doing the backup "Yeah it will take the DB offline but we need to take the SAP down as well and thats why we want to put the startsap and stopsap commands in the bpstart_notify and bpend_notify"

 

Ashish, do you realize that your SAP policy only protects the database, and not SAP itself. As stated by Marianne (and the rest), the bpstart and bpend wont run when you execute your SAP policy as bpbkar is not called/used.

 

If you want to take an offline backup of SAP (not the DB), then you need to create a file system backup (windows or unix), then when that job runs it will call the bpstart script, and shutdown the SAP APP.

Ashish_86
Level 4

Thanks for your response . We are using : A "real" SAP brbackup -offline backup (with backint).

Ashish_86
Level 4

Thanks for your response , so I guess if we are using sap_offline_backup script to start backup , bpbkar would not be called and thats why the pre and post script do not run . But when we tested the same with online backup scripts the pre and post script were running fine.

So I guess we need to insert stopsap and startsap commands in our offline backup script . Any suggestions on it ?

Appreciate all your replies

RiaanBadenhorst
Moderator
Moderator
Partner    VIP    Accredited Certified

What do you want to backup?

 

SAP policies backup the database (scripts to configure are the sap_online or sap_offline and they only apply to the database)

Standard/Windows policies would backup the SAP system i.e front end, application type servers (sorry, not an expert on SAP) (bpstart and bpend are involved here)

 

Inserting anything into sap_online or sap_offline will merely stop that application, it wont back it up.

Ashish_86
Level 4

We are executing brbackup command with the -offline option . As per the application team , DB and SAP application both should be down before backup . The offline backup scripts take cares of the DB but we were trying to figure out a way to stop and start the SAP application automatically.

Do we need to take the SAP down before offline backups ? Should it not automatically reconnect to the DB after the backup once the DB is up

Nicolai
Moderator
Moderator
Partner    VIP   

if brbackup doesn't stop the SAP application you won't find a place in Netbackup that will do it for you. Basically brtool is all what Netbackup and backint integrates to. 

Consider switching -offline with -online and you won't have to bother with offlining the SAP application anymore.