Forum Discussion

Chris_W's avatar
Chris_W
Level 4
6 years ago
Solved

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 Deployment

    At 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.

     

    • Chris_W's avatar
      Chris_W
      Level 4

      I've used both -hosts and -host_filelist but they aren't working for me. -hosts just outright fails like below:

      # nbinstallcmd -operation_type install -package 8.1.2 -media_server mediaservername -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

      -host_filelist doesn't work like the doc explains, I have tried using it these ways below. If there is a space then it takes the first name and ignores the rest (the doc says you must separate the clients with a comma and a space). I have been unable to get VxUpdate to see the list of clients as separate clients, either it assumes it's one long sausage or a single client. I have tried quotes too but no luck.

      -host_filelist client1, client2
      -host_filelist "client1, client2"
      -host_filelist client1,client2

      I have just logged a support case for this.

      • Krutons's avatar
        Krutons
        Moderator

        Jobs that are associated with policies have one set of options, non-policy related jobs have a second set of options. Review the command synopsis for details.

        You can't use -hosts without a policy. So without a policy, you have to use -host_filelist.

        What is the output/error code when you use the command using -host_filelist?