Video Screencast Help

how to make a server Master server using cmd line in the bp.conf file .

Created: 06 Aug 2012 • Updated: 08 Aug 2012 | 9 comments
This issue has been solved. See solution.

Hi,

Got a query on an issue I am facing.

I am migrating clients from NBU old master to new master and when I am trying to change bp.conf entries of client from master server through cmd line, I am using bpsetconfig cmd and it is removing all the previous entries. I want to know is there any way from which we can just change the master server entry in bp.conf file using cmd line.

Do any one know any cmd ?

thanks

Abaig

 

Comments 9 CommentsJump to latest comment

Stuart Green's picture

Can you show us the command your using?

 

You can create a file that contains the parameters you wish to set and
execute
First use bpgetconfig to get the config into a file and then edit the file
 
bpsetconfig -h $server FILE_NAME

See TN:

Setting NetBackup configuration options by using bpsetconfig

However, I suspect this would want the NetBackup Client Service to be restarted also. As you point to a new master.

Tip: Get overview/document your NBU environment. Run 'nbsu' and review the output.

• If this provides help, please vote or mark appropriate solution.

MABaig's picture

I am using this cmd ./bpsetconfig -h $server FILE_NAME, but when I am using these cmd it is removing all the previous entries of media servers in the bp.conf file, Is there any way from which we can just change the master server entry in the bp.conf file using bpsetconfig or any other cmd.

Thanks

Abaig

revaroo's picture

That is not possible without doing some complex scripting.

sed -i 's/masterserver/newmaster/' /usr/openv/netbackup/bp.conf

NOTE: this changes ALL entries for masterserver to newmaster in the bp.conf.

You could use some 'rsh or ssh' commands to do this.

Get a list of unix clients to update. Ensure ssh or rsh allows remote connections. Something like this might work with all clients listed in clientfile text file on each line:

for client in `cat clientfile`

do

rsh $client sed -i 's/masterserver/newmaster/' /usr/openv/netbackup/bp.conf

done

 

 

 

Stuart Green's picture

What about the GUI?

Select all your Clients that you want to update in the Admin Console
Right click Properties.

Add the new Master Server as an Additional Server.
Highlight it and then hit Make Master

You can do this on Linux/UNIX clients , not just Windows.

Tip: Get overview/document your NBU environment. Run 'nbsu' and review the output.

• If this provides help, please vote or mark appropriate solution.

SOLUTION
revaroo's picture

Stuart, does that work for multiple clients selected? If so, nice find.

Stuart Green's picture

Notice the greyed out Add To All. Would appear if multiple clients selected. I only had 1 client selected in this screengrab.

Tip: Get overview/document your NBU environment. Run 'nbsu' and review the output.

• If this provides help, please vote or mark appropriate solution.

MABaig's picture

Revaroo,

Your script worked, but it is deleting the old master entry from bp.conf file.

what I am thinking is we can add the servers through add_Media_server cmd and after that we can change the master server with other added server through GUI, is there any way to change only master server through cmd line.

Thanks,

Abaig. 

revaroo's picture

Yes it is deleting the old master server entry. Your initial post stated:

>> is there any way from which we can just change the master server entry in bp.conf file using cmd line.

IF you change the Master server entry you need to change the other entries such as EMMSERVER too