Re: Pre and post exec on Redhat 4.9 (357 Views)
Reply
Advisor
Posts: 32
Registered: ‎09-18-2006
Message 1 of 5 (388 Views)

Pre and post exec on Redhat 4.9

Hello,

 

I have Data Protector 6.20 on server windows 2k3. I have a RedHat Client too. The client has oracle installed and I like to make a offline backup.

 

I make two scripts with stop and start oracle. I move it on /opt/omni/lbin.

 

When I execute the backup specification I obtain the mistake:

 

sh: /opt/omni/lbin/dbshut.sh: /bin/sh
: bad interpreter: No such file or directory

 

Which is the problem ?? please help me !!!

 

Thanks,

 

Advisor
Posts: 32
Registered: ‎09-18-2006
Message 2 of 5 (386 Views)

Re: Pre and post exec on Redhat 4.9

The scripts with the user "oracle" is works. DP launch it with the user "root". How I can force the execution of the script with "oracle" user?

 

Thanks

Trusted Contributor
Posts: 196
Registered: ‎06-28-2011
Message 3 of 5 (380 Views)

Re: Pre and post exec on Redhat 4.9

Try using the command runuser.

 

HTH

 

Jeremy

Advisor
Posts: 32
Registered: ‎09-18-2006
Message 4 of 5 (369 Views)

Re: Pre and post exec on Redhat 4.9

Thanks but ... How I can to use "runuser" ?? Is in DP ??

Jessuss

Highlighted
Honored Contributor
Posts: 1,157
Registered: ‎02-27-2007
Message 5 of 5 (357 Views)

Re: Pre and post exec on Redhat 4.9

runuser(1) is shipped with coreutils. He is asking you to use runuser when calling the script. You could try someting like /sbin/runuser -c /path/to/script oracle. Just put it into the pre-exec or post-exec section of the backup job.

 

Regards,

Sebastian

---
Assign a kudo to this post, if you find it useful.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.