Directory Services |
The DsBackupPrepare function prepares the directory on the specified server for the online backup and returns a backup context handle used in subsequent calls to other backup functions.
HRESULT DsBackupPrepare( LPCTSTR szBackupServer, ULONG grbit, ULONG btBackupType, PVOID* ppvExpiryToken, LPDWORD pcbExpiryTokenSize, HBC* phbc );
Value | Meaning |
---|---|
BACKUP_TYPE_FULL | Specifies a full backup. The complete directory (DIT, log files, and patch files) are backed up. All data is backed up and transaction log files are truncated. Only full backups are supported. |
BACKUP_TYPE_LOGS_ONLY | This value is not supported. Specifies that only the database logs, and not the database itself, will be backed up. This is normally used when performing a differential or incremental backup. |
BACKUP_TYPE_INCREMENTAL | This value is not supported. DsBackupPrepare returns ERROR_INVALID_PARAMETER. |
Return Code | Description |
---|---|
ERROR_SUCCESS | The function was successful. |
ERROR_INVALID_PARAMETER | szBackupServer and/or phbcBackupContext are invalid. |
ERROR_NOT_ENOUGH_MEMORY | A memory allocation failure occurred. |
hrInvalidParam | ppvExpiryToken and/or pcbExpiryTokenSize are invalid. This value is defined in Ntdsbmsg.h. |
This function requires that the caller has the SE_BACKUP_NAME privilege. The DsSetAuthIdentity function can be used to change the security context under which this function is called.
Client: Included in Windows XP and
Windows 2000 Professional.
Server: Included in Windows Server 2003 and
Windows 2000 Server.
Unicode: Implemented as Unicode and ANSI versions.
Header: Declared in Ntdsbcli.h.
Library: Use Ntdsbcli.lib.
DsRestorePrepare, DsBackupFree, DsBackupOpenFile, DsBackupEnd, DsSetAuthIdentity, Directory Backup Functions, Backing Up and Restoring Active Directory