openfam::fam::fam_delete_backup
delete backup data from archival storage.
Synopsis
void *fam_delete_backup(const char *BackupName);
Description
Initiates a deletion of given backup from archival storage.
Input Arguments
Name | Description |
---|---|
BackupName | Name of the backup. |
Return Values
Returns a pointer to the wait object for the delete_backup operation.
This object can be used to wait for the completion of the delete_backup operation.
Throws Fam_Exception
on error.
Fam Error Numbers
Error | Description |
---|---|
FAM_ERR_INVALID | API called with incorrect parameters. |
FAM_ERR_NOPERM | Caller does not have access rights |
FAM_ERR_OUTOFRANGE | Data access out of range. |
FAM_ERR_LIBFABRIC | Libfabric error occurred. |
FAM_ERR_RPC | Communication error from grpc layer. |
FAM_ERR_RPC_CLIENT_NOTFOUND | RPC service not available. |
FAM_ERR_METADATA | Metadata service error. |
FAM_ERR_MEMORY | Memory service error. |
FAM_ERR_RESOURCE | Resource not available. |
FAM_BACKUP_NOTFOUND | Backup not available. |
Notes
Note that the method is non-blocking: it returns after the backup deletion has been initiated, and does not wait for completion of deletion operation.
Example
#include <string.h> #include <fam/fam.h> #include <fam/fam_exception.h> using namespace std; using namespace openfam; int main(void) { fam *myFam = new fam(); // ... Initialization code here try { // name of backup for given data item. char *backupName = (char *)malloc(FILE_MAX_LEN); sprintf(backupName, "%s.%s", "myRegion", "myItem"); // delete given backupName from archival storage and returns a waitObject to delete operation. void *waitObj = myFam->fam_delete_backup(backupName); // Wait for delete operation to complete. myFam->fam_delete_backup_wait(waitObj); printf("deletion of backup is successful\n"); } catch (Fam_Exception &e) { printf("fam API failed: %d: %s\n", e.fam_error(), e.fam_error_msg()); } // ... subsequent code here }