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
- How to build an XBSA application
- 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
BSADeleteObject
Delete a NetBackup XBSA object.
SYNOPSIS
#include <xbsa.h>
int BSADeleteObject(BSA_Handle bsaHandle, BSA_UInt64 copyId)
DESCRIPTION
The BSADeleteObject() call only deletes an XBSA object from NetBackup. The value for copyId can be obtained from a previous BSAQueryObject() call. The copyId value is unique on a given NetBackup master server. An XBSA application can only delete the NetBackup XBSA objects that it owns.
BSADeleteObject() only works when there is only one object in an image, i.e., one object created per transaction. If there are multiple objects, BSADeleteObject() will return a BSA_RC_SUCCESS status, but the object will still exist.
The actual delete of the object from NetBackup occurs when the transaction is closed with a commit. A query in the same transaction may still return the object. If the transaction is aborted, the object is not deleted.
If the object data is stored in a NetBackup disk storage unit, the data will be deleted with the object. If the object is on a tape storage unit, the data is considered expired but will not be deleted until all objects on the media are expired. It is not possible to create and then delete the same NetBackup XBSA object within a single transaction.
PARAMETERS
BSA_Handle bsaHandle (I) | This parameter is the handle that associates this call with a previous BSAInit() call. |
BSA_UInt64 copyId (I) | This parameter is the unique ID of the XBSA object to be deleted. The value(s) for a specific XBSA object can be obtained through a BSAQueryObject() call. |
RETURN VALUE
The following return codes are returned by this function:
BSA_RC_ABORT_SYSTEM_ERROR | System detected error, operation aborted. |
BSA_RC_ACCESS_FAILURE | Cannot delete an XBSA object with the given copyId. |
BSA_RC_INVALID_CALL_SEQUENCE | The sequence of API calls is incorrect. |
BSA_RC_INVALID_COPYID | The copyId field cannot be zero. |
BSA_RC_INVALID_HANDLE | The handle used to associate this call with a previous BSAInit() call is invalid. |
BSA_RC_OBJECT_NOT_FOUND | The given copyId does not exist. |
BSA_RC_SUCCESS | The function succeeded. |