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
Within each session, an XBSA application can make a sequence of calls (for example, to backup some objects, to query the set of objects it has backed up, or to restore objects). These calls must be grouped into a transaction by invoking BSABeginTxn() at the beginning of the group of calls and invoking BSAEndTxn() at the end. The latter either commits the transaction or aborts it.
If a transaction is aborted either by a BSAEndTxn() or BSATerminate() call, then the effect of all of the calls that are made within the transaction is nullified. If a transaction is committed, then the effect of all the calls within the transaction is made permanent.
Within a single session, transactions cannot be nested and cannot overlap. Transactions are categorized into the following types:
NetBackup XBSA object modification transactions - in which NetBackup XBSA objects may be created or deleted.
NetBackup XBSA object retrieval transactions - in which NetBackup XBSA objects can only be queried and/or retrieved. This type of transaction provides no functional benefit for the calling XBSA application, and is only included for completeness.
The type of a transaction is established by the first create/delete/retrieve operation performed. Attempts to mix operations in a transaction result in a BSA_RC_INVALID_CALL_SEQUENCE error. The permissible call sequences are defined later in this chapter.
Once a transaction starts, many of the XBSA environment variables can no longer be reset. BSA_SERVICE_HOST, NBBSA_CLIENT_HOST, NBBSA_POLICY, and NBBSA_SCHEDULE cannot be modified within a transaction. If these need to be modified, the XBSA application must exit the transaction, make the variable changes, and start a new transaction.