Sample programs
The SDK includes some simple sample programs that can be used as an example of the sequence of function calls that are required to create new objects, query the NetBackup database for existing objects, retrieve the objects, and delete objects. There is a separate program for each of these functions, although this is for the convenience of the samples and not necessarily a recommended way of building an XBSA application.
These programs cannot run as installed. First, they need to be modified to set the correct hostname of the NetBackup server. Then, they can be compiled and each can be individually run. Below is the description of the programs and what to expect from them if they have not been modified other than setting the hostname.
The following section of the sample programs needs to be modified. The entries 'server_host', 'sample_policy', and 'sample_schedule' need to be replaced with actual values from your environment. These three entries can also be eliminated so that the sample program uses the default values from the NetBackup configuration.
/* Populate the XBSA environment variables for this session. */ strcpy(envx[0], "BSA_API_VERSION=1.1.0"); strcpy(envx[1], "BSA_SERVICE_HOST=server_host"); strcpy(envx[2], "NBBSA_POLICY=sample_policy"); strcpy(envx[3], "NBBSA_SCHEDULE=sample_schedule"); envx[4] = NULL;