03-13-2024 02:30 AM - edited 03-13-2024 02:34 AM
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.
03-13-2024 04:20 AM - edited 03-13-2024 04:21 AM
You can use:
/usr/openv/netbackup/bin/admincmd/nbhostmgmt -list -short
It gets a bit messy with multiple mapped names.
03-13-2024 04:54 AM
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.
03-13-2024 06:57 AM
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
03-13-2024 03:24 PM
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
03-13-2024 04:06 PM
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