Directory Services


The DsSetCurrentBackupLog function sets the current backup log number after a successful restore.

HRESULT DsSetCurrentBackupLog(
  LPCWSTR szServerName,
  DWORD dwCurrentLog


[in] The name of the server to back up. Preceding backslashes are optional. An example of a server name is \\server1.

Note  The server name cannot contain an underscore.

[in] Current log number.

Return Values

One of the standard HRESULT success codes; otherwise, a failure code.


The DsSetCurrentBackupLog function does not normally need to be called. The backup functions automatically determine and set the last log number backed up. Use DsSetCurrentBackupLog to prevent another incremental backup from succeeding until a full backup is performed.


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.

See Also

Backing Up and Restoring Active Directory, Directory Backup Functions, DsRestoreRegister