Directory Services

DsBackupGetDatabaseNames

The DsBackupGetDatabaseNames function obtains the list of database files that need to be backed up for the given backup context.

HRESULT DsBackupGetDatabaseNames(
  HBC hbc,
  LPTSTR* pszAttachmentInfo,
  LPDWORD pcbSize
);

Parameters

hbc
[in] Contains the backup context handle obtained with the DsBackupPrepare function.
pszAttachmentInfo
[out] Pointer to a string pointer that receives the list of database file names as UNC paths. This value must be initialized to NULL prior to calling DsBackupGetDatabaseNames.

This list receives a double null-terminated list of single null terminated strings.

This buffer is allocated by the DsBackupGetDatabaseNames function and must be freed when it is no longer needed by calling the DsBackupFree function.

The first character of each of the file names contains one of the BFT Constants that identifies the type of name.

pcbSize
[out] Pointer to DWORD value that receives the size, in bytes, of the pszAttachmentInfo buffer.

Return Values

Returns S_OK if successful or a standard HRESULT, Win32 or RPC error code otherwise.

Remarks

The DsBackupGetDatabaseNames function provides a list of the database files necessary for a backup. A full backup consists of the database files and the log files provided by the DsBackupGetBackupLogs function. Incremental backups of Active Directory are not supported.

Requirements

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

DsBackupPrepare, DsBackupFree, DsBackupGetBackupLogs, BFT Constants, Directory Backup Functions, Backing Up and Restoring Active Directory