Problem
How to gather NetBackup client version and operating system detail for a large number of clients.Solution
- OpsCenter, The Client Coverage report (refer to the Veritas NetBackup™ OpsCenter Reporting Guide)
- NB WebUI ' Security' > ' Hosts' (lists 'Host' name, 'NB version', 'OS type' (UNIX/Windows) for all hosts in the NB domain including master/media servers).
- NB API:
- /config/unique-policy-clients:
'curl' example:
curl -X GET https://<master_hostname_or_IP>:1556/netbackup/config/unique-policy-clients?page%5Blimit%5D=10" -H "accept: application/vnd.netbackup+json;version=5.0" -H "Authorization: <api_key_here>"
{"data":[{"type":"uniqueClient","id":"drtbclient3","attributes":{"hardware":"Linux","priority":0,"clientInfoType":"HOST","reserved2":0,"policyTypes":["STANDARD"],"OS":"RedHat2.6.32"},"links":{"self":{"href":"/config/unique-policy-clients"}}}],"meta":{"pagination":{"pages":1,"offset":0,"last":0,"limit":10,"count":1,"page":0,"first":0}},"links":{"last":{"href":"https://192.168.1.230/netbackup/config/unique-policy-clients?page%5Boffset%5D=0&page%5Blimit%5D=10"},"self":{"href":"https://192.168.1.230/netbackup/config/unique-policy-clients?page%5Boffset%5D=0&page%5Blimit%5D=10"},"first":{"href":"https://192.168.1.230/netbackup/config/unique-policy-clients?page%5Boffset%5D=0&page%5Blimit%5D=10"}}}
- /config/hosts:
'curl' example (note this will produce a list of all hosts in a NB domain which will include master/media servers):curl -X GET https://<master_hostname_or_IP>:1556/netbackup/config/hosts -H "accept: application/vnd.netbackup+json;version=5.0" -H "Authorization: <api_key_here>"
{"hosts":[{"hostKey":null,"uuid":"a6179b22-02ce-4858-8132-1154bb93da84","hostName":"drtbclient3","masterServer":"drtbmaster","installedEEBs":"","installedPackages":"VRTSnetbp_9.0.0.1,VRTSpddes_14.0.1.0,VRTSnbjre_9.0.0.1,VRTSnbjava_9.0.0.1,VRTSpddei_2.0,VRTSnbpck_9.0.0.1,VRTSpddea_14.0.1.0,VRTSpbx_1.13.6.0,VRTSnbclt_9.0.0.1,VRTSnbcfg_9.0.0.1","osType":"UNIX","osVersion":"RedHat Linux (4.18.0-240.el8.x86_64)","osReleaseVersion":"8.3","cpuArchitecture":"x86_64","hwDescription":"GenuineIntel Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz, 2 CPUs","vxUpdatePlatform":"redhat_x64","nbuVersion":"NetBackup_9.0.0.1","comment":"","isSecureEnabled":true,"trustVersion":"pAUQmSxo2tT19ZL","autoReissue":false,"autoReissueDuration":0,"createdDateTime":1617889081000,"lastUpdatedDateTime":1617889180000,"machineType":"VIRTUAL","hypervisorType":"VMWARE","machineNbuType":"NOT_DEFINED","nbcaCert":true,"externalCertificateSubject":"","eebsInstalled":"","hasNetBackupCaHostCertificate":true,"servers":["drtbmaster"],"hostMappings":[{"mappedHostName":"drtbclient3","isApproved":true,"isConflicting":false,"origin":"CERTIFICATE_DEPLOYMENT","isShared":false,"createdOn":1617889081000,"updatedOn":1617889081000,"isAddedManually":false}]}]}
Note: for API references, refer to:
NetBackup API documentation: Where it can be found and how to use the "Try It Out" functionality
https://vox.veritas.com/t5/Protection/NetBackup-API-documentation-Where-it-can-be-found-and-how-to-use/ba-p/870086
NetBackup™ 9.0 API - Getting Started
https://sort.veritas.com/public/documents/nbu/9.0/windowsandunix/productguides/html/getting-started/
NetBackup™ 8.3 API - Getting Started
https://sort.veritas.com/public/documents/nbu/8.3/windowsandunix/productguides/html/getting-started/
NetBackup™ 8.2 API - Getting Started
https://sort.veritas.com/public/documents/nbu/8.2/windowsandunix/productguides/html/getting-started/
Veritas OS NetBackup API code samples on github:
https://github.com/VeritasOS/netbackup-api-code-samples
On your NB master server you can access the 'NetBackup API Documentation' (swagger-ui) via web browser at:
https://<master_hostname_or_IP>/api-docs/index.html
- NetBackup command line:
Another method via the following commands on a Unix/Linux system:
1. The following command generates a text file that will list all the clients from the NetBackup policies:
/usr/openv/netbackup/bin/admincmd/bpplclients -allunique -noheader > /tmp/hosts.out
2. Use one of the following commands to create a text file that will contain the NetBackup and OS version of the clients listed in the hosts.out file above.
for i in `cut -f 3 -d ' ' /tmp/hosts.out`;do /usr/openv/netbackup/bin/admincmd/bptestbpcd -client ${i} -verbose | egrep 'CLIENT_NAME|PLATFORM|PATCH_VERSION';done
--or--
/usr/openv/netbackup/bin/goodies/check_coverage -hardware -hosts /tmp/hosts.out
Example:
# cd /usr/openv/netbackup/bin/goodies
# ./check_coverage -hardware -hosts /tmp/hosts.outGenerating Hosts Report
Completed report for hosts
The Hardware/OS Report can be found in /tmp/hardware_rpt.04-12@13:56
#cat /tmp/hardware_rpt.04-12@13:56 Policy Hardware/OS Report
-------------------------
Key: * - Policy is not active
CLIENT - hostname (uname information)
VERSION - NetBackup version running on the client
CLIENT: L-034220-A.enterprise.veritas.com (Service Pack 2/WindowsXP 5.1 build 2600)
VERSION: 6.5.4
Policy Name Hardware/OS
----------- -----------
*E_drive PC/WindowsXP
*disk_test PC/WindowsXP
test_laptop PC/WindowsXP
From the check_coverage hardware report for the client, L-034220-A.enterprise.veritas.com, is running Netbackup version 6.5.4 and the Operating system Windows XP SP2.
For a Windows platform, the check_coverage report does not offer the same options, so cannot be used.
Attached to this article is a new script file - check_client_version.cmd
This can be used to produce an equivalent list of client on a Windows platform. Simply run this script on it's own. It outputs to the screen, but also creates an output file in the users temp directory (%temp%) called CCV.<username>.out
Where <username> is the name of the logged on user.
Save the attached file to the <installdir>\NetBackup\bin\goodies directory and run it from there.
The script contains a timeout variable, CONNECT_TIMEOUT that can be adjusted if you see a lot of failed connection attempts, the default timeout is 10 seconds, which should be sufficient for most environments.
Script usage:
check_client_version