VxUpdate bulk client upgrade on CLI from master
We have hundreds of Netbackup clients to upgrade to 8.1.2 and would like to kick off a bulk job. Manually using the GUI to build a policy and manually picking all the clients will take forever. So I'd like to use this process as explained in the "Commands Reference Guide" for nbinstallcmd.
"Jobs that you launch can be part of a policy, but a policy is not required to launch an update job."
On the master:
# nbrepo -list ID Type Version OS File Name -- -------- ------- ----------- --------------------------------------- 1 client 8.1.2 windows_x64 vxupdate_nbclient_8.1.2_windows_x64.sja # cat /tmp/vxupdate.list hostname123 hostname456 # nbinstallcmd -operation_type install -package 8.1.2 -media_server mediaserver123 -hosts /tmp/vxupdate.list USAGE: nbinstallcmd -policy [policy] -schedule [schedule] [-hosts [filename] | -host_filelist [client...]] [-master_server [name]] nbinstallcmd -i -policy [policy] -schedule [schedule] [-master_server [name]] nbinstallcmd -operation_type [precheck | stage | install] -package [item...] -media_server [name] [-host_filelist [client]] [-limit_jobs [max_concurrent_jobs]] [-master_server [name]] EXIT STATUS 144: invalid command usage # tail -2 /usr/openv/netbackup/logs/nbinstallcmd/root.052919_00001.log 10:50:47.030 [62847] <2> logparams: -operation_type install -package 8.1.2 -media_server mediaserver123 -hosts /tmp/vxupdate.list 10:50:47.030 [62847] <16> printusage: nbinstallcmd: exited because of invalid option
Backline got back to me today. They have informed me that VxUpdate from the CLI cannot do multiple clients in one execution unless you are using the utility to reference an existing policy with clients defined in it - which in my estimation is utterly useless.
-host_filelist from command line can only do one client at a time. The Command Reference Guide does seem to me to imply you can, but basically they told me I'm reading it wrong, log a product enhancement because tough tacos, it can't do it.
Kruton, here you go:
# nbinstallcmd -operation_type install -package 8.1.2 -media_server mediaserver1 -host_filelist client1,client2 USAGE: nbinstallcmd -policy [policy] -schedule [schedule] [-hosts [filename] | -host_filelist [client...]] [-master_server [name]] nbinstallcmd -i -policy [policy] -schedule [schedule] [-master_server [name]] nbinstallcmd -operation_type [precheck | stage | install] -package [item...] -media_server [name] [-host_filelist [client]] [-limit_jobs [max_concurrent_jobs]] [-master_server [name]] EXIT STATUS 144: invalid command usage #
You might be overthinking the problem. The deployment policy is a policy, right ? And we all hate trying to bulk-update policies via the GUI....
bppolicynew mynewdeploymentpolicy
bpplinfo mynewdeploymentpolicy -modify -pt DeploymentAt this point I'd recommend going in and selecting the package and doing schedule creation through the GUI. I'm sure there's CLI binaries out there to do it but that's more hunting than I have time for right now. =)
When you're ready to build your deployment list :
bpplclients mynewdeploymentpolicy -add client2 Windows windows_x64
bpplclients mynewdeploymentpolicy -add client4 rs6000 aix
bpplclients mynewdeploymentpolicy -add client5 x64 debian
bpplclients mynewdeploymentpolicy -add client6 x64 redhat(or put the client list together using a for loop and a pre-generated input file, whatever works)
Then kick it off using the syntax you've already got. Post-upgrade the clients can be deleted and the policy emptied out prior to its next run.