Planning
Showing results for 
Search instead for 
Do you mean 

SAP backups in a Business Copy environment

Frequent Advisor

SAP backups in a Business Copy environment

Hello everyone,

I have a mission critical SAP environment where we backing up using Business Copy, mouting S-VOLS on another server and using BRBACKUP to backup to tape. Our new BASIS team wants to use the BRBACKUP features and integrate Business COpy into it. i.e. BRBACKUP will issue the split commands .
The challenge here is that BRBACKUP needs to be run as adm and BC(Business Copy) commands need to run as root. Has anyone ever implemented this in any other way in their respective environments?
The choices are :
1. Run pairsplit commands as setuid root (NOT an option)
2. Use a tool like sudo (NOT and option in our environment )
3. Run BRBACKUP as root...
4. ????

CC
10 REPLIES
Honored Contributor

Re: SAP backups in a Business Copy environment

Hi Chetan,

Option 1,

Use a scheduler to schedule jobs.

where Job1 will run as root, job 2 will run as adm (user) keep appendning. Also you can use conditions in 3rd party scheduler, use the completion of Job1 will trigger Job2.

Option 2,
Provide su (permission for sidadm user), where the script will be triggered by your sidadm, before starting the XP commands, it will do a su - root and runs the command.

Option 3, Using cron use the root cron to trigger pairsplit at 00:15 in the night that will provide a ooutput file (touch a file called pair complete), this will then be used by the BRARCHIVE that starts at 00:30 once this file exists start the SAP related command on completion create a file (BR_complete), then BRBACKUP will check for this file and wait till the file arrives and starts under root cron..

Chan
Honored Contributor

Re: SAP backups in a Business Copy environment

I think 3) is your only option. And you modify your cell manager to add users as root and oraddw in the UserList. You can try setting users to 'admin' permissions' in your cell list. This may be different than 'root'.
Support Fatherhood - Stop Family Law
Frequent Advisor

Re: SAP backups in a Business Copy environment

Hi Chan,

Option 1 will not do as Brbackup internally trigers the split of the BC vols

Option 2 will not work as su - will ask for password. The process has to be non-interactive

Option 3 can work. Our environment is complex and the application very critical. So I need to have a clean method to get a good backup.
We are reaching out to SAP, but I also wanted to get some experiences from my peers.

An option 4 that I am thinking of is using a tool like Powerbroker to run BC commands as root. Its like sudo, but its supported.

Thanks for your input.
Frequent Advisor

Re: SAP backups in a Business Copy environment

Micheal,

I am not sure how it would work. BRBACKUP is a user initiated backup. And the part where the issue is long before data goes over the wire to tape. BC sync, split and mount have to occur after which the data is written to tape

Thanks,
CC
Frequent Advisor

Re: SAP backups in a Business Copy environment

You need to use sudo so the user running brbackup either sidadm or orasid can execute the Business Copy commands.

I am using SAP/Oracle/HP-UX/EMC Clariion and followed the EMC whitepaper:
http://www.emc.com/techlib/abstract.jsp?id=1456&c=US&l=en

It is an ~ok whitepaper, but only gives the basis idea.

In the initSID.sap you need to specify the split_cmd and resync_cmd to split and resync the Business Copy disks.

I am using sudo and it is a good option.
You will need a script to split the BC disks and a script to resync the BC disks.

I thought sudo was the only way to do it but here is an ulgy, non-recommended option 4.
The split_cmd command called by the orasid user needs to have the disks split.
The resync_cmd command called by the orasid user needs to have the disks resynced.

Setup a root cron job that runs every 5 minutes and checks if a file exists in a directory and do the split_functions. The split_cmd called by brconnect will create this file and wait for feedback from the root cron job to either continue or fail.

setup a root cron job that runs every 5 minutes and checks if a file exists in a directory and will to the resync functions. The resync_cmd will wait for feedback from the root cron job to either continue or fail.

With sudo or cron job the orasid user will still be able to initiate the split/mount and unmount/resync.

The ulgy handoff to a cron job adds A LOT of complexity.... When you cut out the other options ie sudo this option may work, but I am not using it.
Honored Contributor

Re: SAP backups in a Business Copy environment

Chetan,

I guess you totally misunderstood what I answered...I am having a similar setup and option 1 works for Production while
Option 2 works for Test/Devl Setup

Option1 : Repeat Use 3rd Party Tools for scheduling like Tivoli - Job Schedular, or BMC - ControlM
where you can have a job and key in details. Use any 3rd party tool.


Option2: Try to run a script that will be run by root, which will kick off and runs the Pairspilt, on completion that
same script Phase 2, does a ' su - sidadm stopsap or command '
wait for completion,
Then Phase 3 Start Sap same way ' su - sidadm startsap or command '
Then Phase 4 Start backup

Option3: Agreed your difficulty in a major setup.

Chan
Frequent Advisor

Re: SAP backups in a Business Copy environment

Chetan,

Setting up one cron job say at 0:15 to split the disks will not work good. This would tie the backup time down and not allow it to be changed without intervention.

For the SAP/Oracle brbackup online backup:
brbackup puts Oracle in hot backup mode
brbackup call split_cmd to split the disks
brbackup takes Oracle out of hot backup mode
brbackup calls backint and starts the backup.

The split needs to take place after Oracle is in hot backup mode. If the split takes place only at 0:15 it is very hard to guarantee brbackup will be at the right point for the split. What if they want to schedule a backup at 0:30, the one split command at 0:15 won't work...

-Brad
Honored Contributor

Re: SAP backups in a Business Copy environment

We do quite similar with and oracle db.
The split script is in root cron.
Prior to the split, the script does an su - oracle for shutdown of the db, then goes about it's merry way of splitting the copies.
It then does the su - oracle to start up the db, followed by an emsh to the server mounting the storage for backup.
The remote script mounts up the storage, issues the backup requests, and umounts the storage when backups are complete.
Note this is a 2 tb db and business copy we are performing this on.

Best of luck on this.

Regards,

-dl
"I'm not dumb. I just have a command of thoroughly useless information."
Frequent Advisor

Re: SAP backups in a Business Copy environment

Thanks for all your replies. I implemented this using Symark's Powerbroker. Since this is a highly regulated environment, we went with Powerbroker as it is supported and can capture each session activity where user id was switched to root.
Frequent Advisor

Re: SAP backups in a Business Copy environment

.
//Add this to "OnDomLoad" event