...
Code Block | ||||
---|---|---|---|---|
| ||||
EdmiError edmiRemoteReadBackupResults(SdaiServerContext serverContextId,
SdaiOptions options,
SdaiString backupLocation,
SdaiString databaseName,
SdaiString backupName,
SdaiInteger backupVersion,
SdaiString resultFileName,
SdaiString *resultString,
SdaiInvocationId *edmiInvocationId)
|
This function displays information about generated backups. The information elements are The information are:
- Backup started time
- Exact path of the backup directory
- Backup compressed or not
- Directory path and name of database
- Database created time
- Database version
- Number of bytes copied and name for each database file.
- Time stamp when backup finished.
...
This function is legal for superuser only.
Arguments
...
Type | Name | Comment |
SdaiServerContext | serverContextId | A superuser context identification, from edmiDefineServerContext |
SdaiOptions | options | Options = NEWEST_VERSION is default when<backupVersion> = 0. See description of the available options below. |
SdaiString | backupLocation | Optionally specify directory for backups, i.e. the <databaseLocation> 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 | resultFileName | If a file name is specified here, the information is written to this file |
SdaiString | *resultString | Specify resulting string for backup result. |
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
...
Insert excerpt | ||||||
---|---|---|---|---|---|---|
|
Options
...
Option | Comment |
ALL_VERSIONS | Specify this option if You want to read backup status for all backup versions. |
NEWEST_VERSION | Specify this option if You want to read backup status of the newest backup version only. Default when <backupVersion> = 0 |
OLDEST_VERSION | Specify this option if You want to read backup status for the oldest backup version only. |
Returns:
A completion code of datatype EdmiError is the returned function value. The completion code has the following values:
Completion code = 0 : Operation successfully performed.
Completion code != 0: Error in operation. Completion code is an _EDMinterface_ error code. Use edmiGetErrorText to get the error text corresponding to the error code.
Example:
EdmiError rstat;
SdaiServerContext superContextId;
SdaiOptions options = NEWEST_VERSION;
SdaiString backupLocation =
Example
...
Code Block | ||
---|---|---|
| ||
EdmiError rstat; SdaiServerContext superContextId; SdaiOptions options = NEWEST_VERSION; SdaiString backupLocation = "C:/home/backups/"; |
...
SdaiString databaseName = "proj"; |
...
SdaiString backupName = "PROJ1"; |
...
SdaiInteger backupVersion = 0; |
...
SdaiString resultFileName = "C:/home/output/backup_results.txt"; |
...
SdaiString *resultString = NULL: |
...
... |
...
/* Create Server Context */ |
...
rstat = edmiDefineServerContext("SuperContext", |
...
"superuser", "", "super123", |
...
"TCP", "9090", "MyServerHost", |
...
NULL, NULL, NULL, NULL, NULL, &superContextId); |
...
/* Read backup results for all backups to file */ |
...
if (rstat = edmiRemoteReadBackupResults(superContextId, options, |
...
backupLocation, databaseName, backupName, backupVersion, |
...
resultFileName, resultString, NULL) { |
...
printf("\nError %d in edmiRemoteReadBackupResults: %s", rstat, |
...
edmiGetErrorText(rstat)); |
...
goto error; } ... |
}
...
See also
Filter by label (Content by label) | ||||||
---|---|---|---|---|---|---|
|