Ransomware attackers specifically target and attempt to destroy backup systems to increase the probability of payment. Hardening your system is critical. Please ensure you have reviewed your platform security using the Security Hardening Checklist
Cohesity

COHESITY Documentation

Explore our documentation to get started, discover products & new features, access troubleshooting guides, register sources, platforms support.

Products
Data Security Alliance
Visit Cohesity.com
Demos
Support
Blogs
Developers
Partner Portals
Cohesity Community
© 2026 Cohesity, Inc. All Rights Reserved.
Terms of Use|
Privacy Policy|
Legal|
  1. Home
  2. Veritas NetBackup™ DataStore SDK Programmer's Guide for XBSA 1.1.0
  3. API reference
  4. Function specifications
  5. NBBSADeleteImage
Veritas NetBackup™ DataStore SDK Programmer's Guide for XBSA 1.1.0

NBBSADeleteImage

Delete a NetBackup image.

SYNOPSIS

#include <nbbsa.h>

int NBBSADeleteImage(BSA_Handle bsaHandle, BSA_UInt64 copyId)

DESCRIPTION

NBBSADeleteImage() deletes a NetBackup image given the copyId of an XBSA object. The value for copyId can be obtained from a previous BSAQueryObject() call. The copyId value is unique on a given NetBackup Master Server. The XBSA application can only delete a NetBackup image that contains the XBSA objects that it owns.

NBBSADeleteImage() deletes an image regardless of the number of objects contained in an image. For an image containing multiple objects, NBBSADeleteImage() only needs to be called once passing in the copyId of any of the objects contained in the image.

The deletion of an image occurs during the NBBSADeleteImage() processing.

If the image data is stored in a NetBackup disk storage unit, the data is deleted with the image. If the image is on a tape storage unit, the data is considered expired but is not deleted until all of the images on the media are expired. You cannot create and then delete an image 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 an XBSA object that is contained in the image to be deleted. The value 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 NetBackup image with the given copyId.

BSA_RC_INVALID_CALL_SEQUENCE

The sequence of API calls is incorrect. Within a transaction calling NBBSADeleteImage(), it is permissible to embed BSAQueryObject() and BSAGetNextQueryObject() calls. This allows the XBSA application to intermix NBBSADeleteImage() calls with BSAQueryObject() and BSAGetNextQueryObject() calls to delete multiple images within one transaction. Backup and restore operations are not allowed within a transaction that calls NBBSADeleteImage().

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.

Feedback

Was this page helpful?
Previous

NBBSAAddToMultiObjectRestoreList

Next

NBBSAEndGetMultipleObjects

Feedback

Was this page helpful?