The IMSAdminBase::Backup method backs up the metabase to a backup location you specify by providing a backup location name of up to 100 characters in length. Multiple metabase backups can be stored in a backup location.
Note IIS determines the backup storage mechanism, so the backup location name you provide does not necessarily translate to a particular directory, file, or database storage mechanism. As implemented in this release, metabase backups are stored as files in the SYSTEM32\INETSRV\METABACK directory. This mechanism may change in future releases.
HRESULT Backup(
LPCWSTR pszMDBackupLocation,
dwMDVersion,
dwMDFlags
);
MD_BACKUP_HIGHEST_VERSION | Overwrite the highest existing backup version in the specified backup location. |
MD_BACKUP_NEXT_VERSION | Use the next backup version number available in the specified backup location. |
MD_BACKUP_FORCE_BACKUP | Force the backup even if the SaveData operation specified by MD_BACKUP_SAVE_FIRST fails. |
MD_BACKUP_OVERWRITE | Back up even if a backup of the same name and version exists in the specified backup location, overwriting it if necessary. |
MD_BACKUP_SAVE_FIRST | Perform a SaveData operation before the backup. |
Returns an HRESULT that contains one of the values listed in the table below. Other errors may also be returned that are passed through from the file system, or from a crypto api when secure metabase data is being saved.
Value | Description |
---|---|
E_INVALIDARG | An argument was invalid |
ERROR_NOT_ENOUGH_MEMORY | Insufficient memory to perform the operation |
ERROR_SUCCESS | The method succeeded. |
MD_WARNING_SAVE_FAILED | This is a warning, not an error. |