cancel
Showing results for 
Search instead for 
Did you mean: 

How to add new mediaserver to NetBackup client configuration automatically

Anton_Panyushki
Level 6
Certified
Hello,
We are going to install a new mediaserver and want to add mediaserver's name to all Netbackup clients' configurations in an unattended way. Is there any script or program to do that?

Thank you very much in advance.
7 REPLIES 7

h_m
Level 6
I am not aware of a method. If windows clients then NBU updates the registry, so if you have any sort of framework app you may be able to use it to add the name to the right registry key.

If UNIX clients then you should be able to script an additional entry to bp.conf, assuming you can rsh or ssh to all clients.

Stumpr2
Level 6
You can use the GUI.
Go to "Host Properties"
Clients

select a few or all of the clients

simply bring up the server tab and you can enter the new media server on all of the client properties that you selected at the same time.

DavidParker
Level 6
Bob has a great suggestion (as usual)!

1 minor thought to add to that: if some of the clients are behind a firewall/etc then the Host Properties method may not work for them.

Just a thought ...
$0.00.5

Stumpr2
Level 6
firewalls? you could also try to use bpsetconfig


Misc. Reference Manual Pages bpsetconfig

NAME
bpsetconfig - A program used to update a NetBackup confi-
guration.

SYNOPSIS
/usr/openv/netbackup/bin/admincmd/bpsetconfig

/usr/openv/netbackup/bin/admincmd/bpsetconfig -H

DESCRIPTION
The bpsetconfig command is used as a standalone program, or
as a helper program with the backuptrace and restoretrace
commands, to update a configuration. This command is avail-
able for all NetBackup server platforms.

You must have root privileges to execute this command.

OPTIONS
-h "host" Specifies the host name ("host") of the server or
client whose configuration will be updated.

-u "user" Specifies the user ("user") whose configuration
will be updated.

"file" ...
Specifies the file or files where the updates are
listed. If not specified, standard input is read.

-H Displays the help screen.

Example
The following example demonstrates how to set a NetBackup
configuration on a different system.

bpsetconfig -h orange.colors.org

SERVER = yellow.colors.org

SERVER = orange.colors.org



The result of running the this command is to set the Net-
Backup configuration on the system orange.colors.org to the
designated server that follows. This means that
yellow.colors.org is the master server for the client
orange.colors.org:

SERVER = yellow.colors.org

SERVER = orange.colors.orgMessage was edited by:
Bob Stump

Stumpr2
Level 6
> If UNIX clients then you should be able to script an additional entry
> to bp.conf, assuming you can rsh or ssh to all clients.

don't need to rsh or ssh. The way NetBackup did it back in the 3.4 days was via a simple shell program. Back then the program was readable, but now it is a binary and I'm not for sure how it works now. back then it simply copied over the current bp.conf file from the client to the master server and appended the new media server entry to the clients bp.conf and then sent it back to the client. The name of the script is add_slave_on_client.

It had lines similar to this:

bpgp from $CLIENT /usr/openv/netbackup/bp.conf /tmp/$CLIENT.bp.conf
cat "SERVER = NEW_MEDIASERVER" >> /tmp/$CLIENT.bp.conf
bpgp to $CLIENT /tmp/$CLIENT.bp.conf /usr/openv/netbackup/bp.conf

that's where I discovered bpgp


to use bpgp with windows:
bpgp from W2K "/C/\\Program Files\\VERITAS\\NetBackup\\Logs\\Bptm\\121406.log" /tmp/gotit

You need the quotes because of the space character between "Program Files"Message was edited by:
Bob Stump

h_m
Level 6
nice security loophole bpgp!

Stumpr2
Level 6
It is a two edged sword. It's saved me more than once. So far I haven't been cut by it.