cancel
Showing results for 
Search instead for 
Did you mean: 

CLI Command to list Host ID

kumar3
Level 4
Certified

Hello Experts,

I need to know the CLI command which is equivalent to following option from NetBackup admin console.

Security Management -> Host Management -> Netbackup Host ID

Want to list certificate expiry date and host ID for given host from master server.

 

Thanks.

5 REPLIES 5

L_BR
Level 5

You can use:

/usr/openv/netbackup/bin/admincmd/nbhostmgmt -list -short

It gets a bit messy with multiple mapped names.

kumar3
Level 4
Certified

Thanks for the reply, this command gives one result with host_id, but still missing the certificate expiry date. I tried to option -json also but seems its not there.

kumar3
Level 4
Certified

I need command similar to following but that should work from master server and give result for all clients at once, or any client if passed as an argument in the command.

/usr/openv/netbackup/bin/nbcertcmd -listcertdetails

Hi @kumar3 

Try this command - I think it gives what you want for all clients (not a specific one):
nbcertcmd -listcertificate | jq 

You will probably need to use bpnbat to login before running (it will let you know if you do).

The output from listcertificate is a mess without the jq (json processor to make it readable). The certificate expiry is included, but is displayed as a ctime value (which is simple enough to convert to a date).

Cheers
David

Hi @kumar3 

You can also use the nbhostmgmt command to show all or specific host details (-list & -list -host <host>). The output from this command is human readable but does not include the certificate issue/expiry dates (nor does the Host Management section in the GUI for that matter). The nbcertcmd is the only option to provide both the hostID and the certificate dates. 

A quick update on the output from the nbcertcmd -listcertificate output - the times shown for notBefore and notAfter is the ctime multiplied by 1000. So drop the last 3 zeros, before converting. 

David