3.2.4.1.18 ICertAdminD::BackupPrepare (Opnum 20)

Sequencing rules are as follows:

  1. Before a certificate services backup can occur, a call to BackupPrepare MUST be made to notify the CA that a backup of the CA is about to happen.

  2. The functions BackupGetAttachmentInformation and BackupGetBackupLogs are used after BackupPrepare to retrieve the certificate services list of database file names and database log file names.

  3. To open a file for backup purposes, BackupOpenFile MUST be used before BackupReadFile or BackupCloseFile.

  4. After opening the file for backup purposes (using BackupOpenFile), BackupReadFile is used to retrieve the contents of the file and call an application-specific routine to write the contents to a backup medium.

  5. Before reading another file, BackupCloseFile MUST be called to close the already read file.

  6. When the backup session is completed, BackupEnd MUST be invoked.

The client MUST follow the preceding sequencing rules. If BackupPrepare returns a failure, the client MUST NOT make any further method calls related to backup. If the sequencing rules are not met, the server returns ERROR_UNEXPECTED_ERROR.

The client application MUST ensure that a full backup (grbit parameter with value 0) has already happened before calling the server for incremental backup (grbit parameter with value 1).