Veritas NetBackup™ DataStore SDK Programmer's Guide for XBSA 1.1.0
- Introduction to NetBackup XBSA
- How to set up the SDK
- Using the NetBackup XBSA interface
- NetBackup XBSA data structures
- NetBackup XBSA environment
- XBSA sessions and transactions
- Creating a NetBackup XBSA application
- Initiating a session
- Backup - creating an object
- Query - finding an object descriptor
- Restore - retrieving an object's data
- Delete - deleting an object or image
- Media IDs - obtaining media IDs
- How to build an XBSA application
- How to run a NetBackup XBSA application
- About How to run a NetBackup XBSA application
- API reference
- Function calls
- Function specifications
- Type definitions
- Process flow and troubleshooting
- How to use the sample files
- Support and updates
- Appendix A. Register authorized locations
How to build the sample programs
Also included with the samples are a Makefile for UNIX platforms, Makefile.unix, and one for Windows, Makefile.nt. The Makefiles compile the four sample programs using basic compiler options.
The UNIX Makefile needs to be modified to select which library to use. Library paths for all of the supported platforms are in the Makefile but commented out. The library for the required operating system needs to be chosen along with whether to use an archive library or a shared library.
The following lines are from Makefile.unix. One of the CFLAGS and one of the LIBS definitions need to be uncommented. The default is to compile 64 bit using the dynamic shared libraries.
The CFLAGS definitions are compile options. Select a CFLAGS definition for the system that is being compiled on. Note that this is a very minimal set of options and you can add other compile options based on your environment.
# Uncomment the CFLAGS for the environment that is being compiled # Solaris sparc 64 bit #CFLAGS = -xarch=v9 # Solaris Opteron 64 bit #CFLAGS = -xtarget=opteron -xarch=generic64 # HP IA64 bit #CFLAGS = -Ae +DSitanium2 +DD64 # AIX 64 bit #CFLAGS = -q64 # Linux x86 64 bit #CFLAGS = -m64 # Linux on Power PC 64 bit #CFLAGS = -m64 DEFINES = INCLUDES= -I$(XBSA_SDK_DIR)/include
The LIBS definitions define to which XBSA library to link. A shared object library is installed in /usr/openv/lib on all NetBackup clients and can be used for dynamic linking. An archive library for each platform is included in the SDK and can be used to statically link the application. Select a LIBS definition for the system that is being compiled.
# Use one of these LIBS to bind dynamically #LIBS = -L/usr/openv/lib -lxbsa -lnbclientcST -lnbbasecST #LIBS = -L/usr/openv/lib -lxbsa64 -lnbclientcST -lnbbasecST # Or choose the correct LIBS for your system to bind statically #LIBS = $(XBSA_SDK_DIR)/lib/HP-UX-IA64/HP-UX11.31/libxbsa.a #LIBS = $(XBSA_SDK_DIR)/lib/Linux/Debian2.6.32/libxbsa64.a -lc -ldl #LIBS = $(XBSA_SDK_DIR)/lib/Linux/RedHat2.6.32/libxbsa64.a -lc -ldl #LIBS = $(XBSA_SDK_DIR)/lib/Linux/SuSE4.4.73/libxbsa64.a -lc -ldl #LIBS = $(XBSA_SDK_DIR)/lib/Linux-ppc64le/IBMpSeriesRedHat3.10.0/libxbsa.a -lc -ldl #LIBS = $(XBSA_SDK_DIR)/lib/Linux-ppc64le/IBMpSeriesSuSE4.4.21/libxbsa.a -lc -ldl #LIBS = $(XBSA_SDK_DIR)/lib/Linux-s390x/IBMzSeriesRedHat2.6.32/libxbsa.a -lc -ldl #LIBS = $(XBSA_SDK_DIR)/lib/Linux-s390x/IBMzSeriesSuSE4.4.73/libxbsa.a -lc -ldl #LIBS = $(XBSA_SDK_DIR)/lib/RS6000/AIX6/libxbsa64.a -ldl -lc #LIBS = $(XBSA_SDK_DIR)/lib/Solaris/Solaris10/libxbsa64.a -lintl -lsocket -lnsl -ldl -ladm #LIBS = $(XBSA_SDK_DIR)/lib/Solaris/Solaris_x86_10_64/libxbsa.a -lintl -lsocket -lnsl -ldl -ladm
The Windows Makefile may need to be modified to select which Windows library to use. The Windows Makefile needs to be modified if SDK was installed into a directory other than the default c:\Program Files.
#LIBS = $(XBSA_SDK_DIR)\lib\Windows-x64\Windows\xbsa.lib