09-27-2013 07:23 AM
Hi Guys,
We are currently trying to add some new media server hostnames to the the "additional servers" in Client Properties under the server tab. The problem is that we have over 1,000 clients to change. I know you can manually do it, which would take forever, but is there a way I could automate this via command line? I've been looking through the command guide but I think I'm missing something?
Thanks
Solved! Go to Solution.
09-27-2013 07:44 AM
On the Master in the netbackup\bin\ directory is the add_media_servers_on_clients executable
Run this on the Master and it will update all clients to have the same servers in their list as the Master has
It will need to be able to connect to them all to do it
Hope this helps
09-27-2013 07:27 AM
When you say automate, how many clients do you want to add the additional servers to?
All of them? Just a few in specific policies?
09-27-2013 07:32 AM
We have to add the new media server hostnames to all of our client properties.
Thanks
09-27-2013 07:44 AM
On the Master in the netbackup\bin\ directory is the add_media_servers_on_clients executable
Run this on the Master and it will update all clients to have the same servers in their list as the Master has
It will need to be able to connect to them all to do it
Hope this helps
09-27-2013 09:05 AM
NetBackup geezer alert!
Longtime ago the add_media_servers_on_clients was an ordinary shell and it is where bpgp was discovered ;)
It pulled the bp.conf file from the client to the master, added the server, wrote new bp.conf on client.
09-27-2013 09:20 AM
If you are mostly windows then you can write vbs or whatever to export the server key from the registry, append the new server and then import the new key.
HKLM\Software\VERITAS\Netbackup\CurrentVersion\Config\Server
Using the NetBackup GUI to alter client properties page really sucks because you can only do about 25 servers at a time.
09-27-2013 10:52 AM
hopefully simplistic things like this call be rolled out (along with auto updating of clients)
10-07-2013 07:21 AM
We ended up doing it by hand. We didnt use the add_media_servers_on_clients executable as there are quite a few servers that on the master that we don't want pushed to all clients.
Thanks for the assistance. I'm not sure how to close this but the topic can be closed.
10-08-2013 05:08 AM
Why not use bpgetconfig / bpsetconfig with the relevant switches. I am assuming it works on windows the same as unix.
When we changed our Master we used it to modify hundreds of clients via a script in about 2 minutes.
- Darren
10-08-2013 01:22 PM
this too will work but there is one caveate. You have to add all media servers with the command. You can't add a single server but must add the entire list
10-08-2013 02:06 PM
Hi,
Thats what the bpgetconfig is for. We get the server list, edit it to what we require (adding or removing media servers), and then use bpsetconfig to send it back.
For example to add a new media server we do
bpgetconfig -M client_name Server | awk '
$1=="Server" { print $0 }
END {print "Server = newmediaserver"}' > /tmp/setconfig
then
bpsetconfig -h client_name /tmp/setconfig
Works like a charm for us.
10-09-2013 09:05 AM
ayep. As long as you include all the Servers originally designated along with the new server then it works. Unfortunately the documentation for bp(gs)etconfig does not do a good job of explaining.