edmiRemoteDeleteBackup
EdmiError edmiRemoteDeleteBackup(SdaiServerContext serverContextId, SdaiOptions options, SdaiString backupLocation, SdaiString databaseName, SdaiString backupName, SdaiInteger backupVersion, SdaiString passwordOfBackupDatabaseToDelete, SdaiInvocationId *edmiInvocationId);
This function deletes a specified backup version or all backup versions in the backup location given. This function is legal for superuser only.
Arguments
Type | Name | Comment |
 SdaiServerContext | serverContextId | A superuser context identification, from edmiDefineServerContext |
 SdaiOptions | options | See description of the available options below. |
 SdaiString | backupLocation | Optionally specify directory for backups, i.e. the <database Location> is default. |
 SdaiString | databaseName | Specify the name of the database. |
SdaiString | backupName | Specify the name of the backup. This name is included in the backup file name. See edmiRemoteBackupDatabase |
 SdaiInteger | backupVersion | Specify backup version if no option is used. |
 SdaiString | passwordOfBackupDatabaseToDelete | Password of the backed up database that should be deleted. |
 SdaiInvocationId | *edmiInvocationId | Not yet used. When the <edmiInvocationId> is specified unequal NULL, the actual operation will be asynchronous and a handle (identifier) of the call will be returned in the <edmiInvocationId> argument. |
Return Value
Â
Options
Option | Comment |
ALL_VERSIONS | This option will delete all backup versions. |
NEWEST_VERSION | This option will delete the newest version of the backup versions. |
OLDEST_VERSION | This option will delete the oldest version of the backup versions. |
Example
Â
 EdmiError rstat; SdaiServerContext superContextId; SdaiOptions options = OLDEST_VERSION; SdaiString backupLocation = "C:/home/backups/"; SdaiString databaseName = "proj"; SdaiString backupName = "PROJ1"; SdaiInteger backupVersion = 1; SdaiString backedUpDbPassword = "pro123"; ... /* Create Server Context */ rstat = edmiDefineServerContext("SuperContext", "superuser", "", "super123", "TCP", "9090", "MyServerHost", NULL, NULL, NULL, NULL, NULL, &superContextId); /* Delete the oldest backup version */ if (rstat = edmiRemoteDeleteBackup(superContextId, options, backupLocation, databaseName, backupName, backupVersion, backedUpDbPassword, NULL, NULL) { printf("\nError %d in edmiRemoteDeleteBackup: %s", rstat, edmiGetErrorText(rstat)); goto error; } ...
Â
See also
Filter by label
There are no items with the selected labels at this time.
Â