HrBackupPrepare

The HrBackupPrepare function connects to a remote Microsoft Exchange Server database and prepares it for backup.

Quick Info

Header file: EDBBCLI.H
Library: EDBBCLI.LIB
Unicode: Yes

HRESULT HrBackupPrepare(
  char * szBackupServer,      
  char * szBackupAnnotation,  
  unsigned long grbit,        
  unsigned long btBackupType,  
  HBC * hbcBackupContext      
);
 

Parameters

szBackupServer
Input parameter. Specifies the name of the server to backup. Preceding backslashes are optional. An example of a server name is \\server1.

Note The server name cannot contain an underscore.

szBackupAnnotation
Input parameter. Specifies the database to backup.
grbit
Input parameter. Determines whether to back up all log files during an incremental backup or the uncommitted log files during a full backup.
1
Backup the log files.
0
Do not backup the log files.
btBackupType
Input parameter. Specifies the type of backup to perform.
BACKUP_TYPE_FULL
Full backup. All data is backed up and transaction log files are truncated.
BACKUP_TYPE_LOGS_ONLY
Backup only database logs, but not the database. This is normally used when performing a differential or incremental backup.

Note Use this parameter to test whether this type of backup can be performed at this time. If this function fails with a certain btBackupType, this type of backup is not allowed.

hbcBackupContext
Output parameter. Specifies the client-side context handle for the backup.

Return Values

See Return Values.

Remarks

The HrBackupPrepare function requires that the caller is a member of the Backup Operators group on the server.

For more information on this function, see Backing Up and Restoring Data.

See Also

HrBackupEnd