Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »


 
This function is legal for superuser only.
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.

Related functions: edmiRemoteBackupDatabase, edmiRemoteStopBackup. edmiRemoteDeleteBackup, edmiRemoteRestoreBackup , edmiRemoteGetBackupStatus
 
Header:
#include "sdai.h"
Prototype:
EdmiError edmiRemoteReadBackupResults(SdaiServerContext serverContextId,                                      SdaiOptions       options,                                      SdaiString        backupLocation,                                      SdaiString        databaseName,                                      SdaiString        backupName,                                      SdaiInteger       backupVersion,                                      SdaiString        resultFileName,                                      SdaiString        *resultString,                                      SdaiInvocationId  *edmiInvocationId);
 
Arguments:

serverContextId

A superuser context identification, from edmiDefineServerContext

options

Options = NEWEST_VERSION is default when<backupVersion> = 0. See description of the available options below.

backupLocation

Optionally specify directory for backups, i.e. the <databaseLocation> is default.

databaseName

Specify the name of the database.

backupName

Specify the name of the backup. This name is included in the backup file name. See edmiRemoteBackupDatabase.

backupVersion

Specify backup version if no option is used.

resultFileName

If a file name is specified here, the information is written to this file

*resultString

Specify resulting string for backup result.

*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.
This handle can be used in later operations for requesting the status (waiting, running, finished ..) and the result of the actual operation.

Options: Descriptions:

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 = "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; 
}
 
...

  • No labels