cancel
Showing results for 
Search instead for 
Did you mean: 

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

 

2 Solutions

Accepted Solutions
Accepted Solution!

Re: VxUpdate bulk cliet upgrade on CLI from master

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
#

View solution in original post

Accepted Solution!

Re: VxUpdate bulk cliet upgrade on CLI from master

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.

 

View solution in original post

10 Replies

Re: VxUpdate bulk cliet upgrade on CLI from master

Hello,

hosts vs. host_filelist?

Regards

Michal

Re: VxUpdate bulk cliet upgrade on CLI from master

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.

Re: VxUpdate bulk cliet upgrade on CLI from master

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? 

Re: VxUpdate bulk cliet upgrade on CLI from master

Chris

 

Are you aware that in the GUI under Host Properties-> Clients, you can select a client (or clients) right click and one of the options is to upgrade.

This doesn't solve your command line issue, but will allow you do achive the same result.

Cheers
David

Re: VxUpdate bulk cliet upgrade on CLI from master

Thanks, yes I found that you can do this way yesterday and I've now done some this way, but the issue is that NBU queues them one at a time, can't do jobs in parallel.

It still doesn't make life all that much easier for us. We have 3600 clients and separate teams log us calls when they have change controls for them. So we need to be able to kick off batches, and manually picking them from a list takes an inordinate amount of time, my control+c control+v hand is getting carpal tunnel.

At present my engineer is liaising with engineering, it seems these options in the command reference guide are not working, so the utility is buggy.

Re: VxUpdate bulk cliet upgrade on CLI from master

And what is the output when you use -host_filelist? You still haven't shown what error is displayed.

Accepted Solution!

Re: VxUpdate bulk cliet upgrade on CLI from master

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
#

View solution in original post

Accepted Solution!

Re: VxUpdate bulk cliet upgrade on CLI from master

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.

 

View solution in original post

Re: VxUpdate bulk cliet upgrade on CLI from master

John_Nardello1, you are absolutely right. Your recommendation worked well, thank you.

I looped a long list doing the following and the update is running well (initiated through the GUI).

# for i in `cat /tmp/clientlist`; do bpplclients Chris_2 -add $i x64 windows ;done

I promise to update the Solution on this thread but at the moment my old VOX account I can't get into, case sitting with Veritas to fix it. As soon as I can login I'll fix this.

Re: VxUpdate bulk cliet upgrade on CLI from master

I cheated and looked at the code that processes the arguments. It accepts up to 50 client names without giving the USAGE response.

The expected syntax is -host_filelist client1,client2,client3

Max of 50 cilents
No spaces, no quotes
At most one -hosts or -host_filelist parameter

This is not why you are getting the USAGE response. The problem is with the -operation_type parameter. It must be preceded by -policy and -schedule parameters. The first USAGE alternative shows this. The third alternative will not be accepted. I'll write an internal bug report on this.