dsmDeleteObj

The dsmDeleteObj function call inactivates backup objects, deletes backup objects, or it deletes archive objects in storage. The dtBackup type inactivates the currently active backup copy only. The dtBackupID type removes from the server whichever object ID is specified. Call this function from within a transaction.

See dsmBeginTxn for more information.

Restriction: You cannot delete backup objects that are contained in a retention set. To satisfy long-term data retention requirements, these files remain in server storage and expire according to the retention set's own expiration date after which they are eligible for deletion.

Before you send dsmDeleteObj, send the query sequence that is described in Querying the IBM Storage Protect system to obtain the information for delInfo. The call to dsmGetNextQObj returns a data structure named qryRespBackupData for backup queries or qryRespArchiveData for archive queries. These data structures contain the information that you need for delInfo.

The value of maxObjPerTxn determines the maximum number of objects that you can delete in a single transaction. To obtain this value, call dsmQuerySessInfo.

Tip: Your node must have the appropriate permission that your administrator set. To delete archive objects, you must have archive delete authority. You do not need backup delete authority to inactivate a backup object.

Syntax

dsInt16_t dsmDeleteObj  (dsUint32_t      dsmHandle,
   dsmDelType  delType,
   dsmDelInfo  delInfo)

Parameters

dsUint32_t dsmHandle (I)
The handle that associates this call with a previous dsmInitEx call.
dsmDelType delType (I)
Indicates what type of object (backup or archive) to delete. Possible values include:
  Name Description
  dtArchive The object to delete was previously archived.
  dtBackup The object to inactivate was previously backed up.
  dtBackupID The object to delete was previously backed up.
Restriction: Using this delType with objID removes the backup object from the server. Only an owner of an object can delete it.

You can delete any version (active or inactive) of an object. The server reconciles the versions. If you delete an active version of an object, the first inactive version becomes active. If you delete an inactive version of an object, all older versions will advance. The node must be registered with backDel permission.

dsmDelInfo delInfo (I)
A structure whose fields identify the object. The fields are different, depending on whether the object is a backup object or an archive object. The structure to inactivate a backup object, delBack, contains the object name and the object copy group. The structure for an archive object, delArch, contains the object ID.

The structure to remove a backup object, delBackID, contains the object ID.

Return codes

The return code numbers are provided in parentheses ( ).

Table 1. Return codes for dsmDeleteObj
Return code Explanation
DSM_RC_FS_NOT_REGISTERED (2061) File space name is not registered.
DSM_RC_WRONG_VERSION_PARM (2065) Application client API version is different from the IBM® Storage Protect library version.