Video Screencast Help
Symantec to Separate Into Two Focused, Industry-Leading Technology Companies. Learn more.

Netbackup commands and scriptings running on media server instead of master server

Created: 14 Jan 2013 | 8 comments

Hi All,

Our last System Integrator made menu using korn shell scripting (on HP-UX) and netbackup commands on the Master Server, this menu is for operator for daily operation like marking the tape, produce reports.

Now the master we will move to Linux, our script is quite complicated to me to migrate to other platform, so I was thinking I move the scripting to the meida server (on HP/UX) since this media server we still use after the migration.

Is it possible run all Netbackup command from media servers? I have test most of the script works.

Thank you.

Iwan

Comments 8 CommentsJump to latest comment

RamNagalla's picture

yes, you have a option to run the commands to run from master server, 

but sometimes, few commands required to specify the Master server name when running from Media server, which is not required when running from master server.

so you would neeed to check if the scripts  are using the master/EMM server switch in commands, if yes you are good to go.

els you may need to modify the script according to that..

Marianne's picture

Any reason why korn shell scripts won't work on Linux?

Try it first.

Else, you will have to examine each command - some of them need -M <master> (mostly 'bp' commands) and some  -h <EMM_server> ('vm' commands).

Supporting Storage Foundation and VCS on Unix and Windows as well as NetBackup on Unix and Windows
Handy NBU Links

mph999's picture

Both very good points from Marianne and Iwan.

Most korn shell stuff should work on either Solaris or Linux, give it a go ...

Additionally, you mighht want to make sure that the media servers are defined in bp.conf on the master as :

SERVER = <media server name>

as opposed to ...

MEDIA_SERVER = <media server name>

as SERVER entries get more 'permissions' than MEDIA_SERVER.

Martin

Regards,  Martin
 
Setting Logs in NetBackup:
http://www.symantec.com/docs/TECH75805
 
Nicolai's picture

Examine first line of the script. It should look like something

#!/usr/bin/???

Where ??? is a 2-3 letter combination. E.g ksh,sh or more rare on HP-UX csh.

If the author has chosen to use the Korn Shell (ksh) the script is a simple copy operation. If no shell is chosen you may dig a little deeper. 

Assumption is the mother of all mess ups.

If this post answered your'e qustion -  Please mark as a soloution.

Mark_Solutions's picture

I have not noticed a command yetthat cannot be run from a media sever (do it all the time when i am doing remote support and end up on a windows media server for clients with unix based master servers)

As Martin and Marianne say you just need to make sure it is authorised to run such commands (and media servers usually are) and just add the -h and /or -M (watch out for the -host ones - always get me!)

Authorised Symantec Consultant

Don't forget to "Mark as Solution" if someones advice has solved your issue - and please bring back the Thumbs Up!!.

Jim-90's picture

Korn shell has been open source since 2000 I would get the Linux admins to install it if the menu is not using SAM. 

I long time ago I gave the Operators the ability to use SAM (the HP-UX  admin menu system) to run all the scripts becasue it was built into the OS , simple and could be used like sudo.  SAM is unique to HP-UX and the functionality cannot be ported to any other flavour of Unix/Linux.

I run all my scripts on a Linux media server with a windows master server,  

Not being able to convert from ksh to to bash tells me you have a bigger problem.     Your scripts over time will probably start failing. Everytime you upgrade there is the potential that the output of CLI will change, plus scripts have to be altered to allow for new features. I had scripts that listed only failed parent jobs, with VMware using rules to add clients the failed parent only lists the media server as the client (useless).  Similarly any scripts that produced reports on clients from the output of bppllist may not work when upgrading from 7.1 to 7.5 the output has changed slightly, if you add VMware client selection based on rules the scipts will either refuse to work or ignore the clients altogether becaue the rule selection criteria may not be based on hostname.

If the scripts only contain NBU you might be lucky, references to location of devices (tape drives) and other stuff that are not linux will not work.  Porting scripts from one unix to another does require some work,

watsons's picture

The only problem I can think of was something old, that some Netbackup custom scripts (available_media in bin/goodies) was known to have issue running on Linux system.

The issue was OS-related, and can be resolved easily by this technote:

http://www.symantec.com/docs/TECH59400

It may not happen in your case though.

Iwan Tamimi's picture

Hi All,

Thank you very much for all  the valuable inputs, I am really sorry for the late reply.

Looks like we will use the "converted" script to Linux. But I will still use the one on media server as a backup just in case there would be lots of syntax error.

Thanks again.

IWan