The IMSAdminBase::Restore method restores the metabase from a backup. The restore operation stops all services dependent on IISADMIN, including all servers, until the restore has completed, then restarts all services. You should plan for this service interruption when restoring the metabase from a backup.
HRESULT Restore(
LPCWSTR pszMDBackupLocation,
DWORD dwMDVersion,
DWORD dwMDFlags
);
MD_BACKUP_HIGHEST_VERSION | Restore from the highest existing backup version in the specified backup location. |
Returns an HRESULT that contains one of the values listed in the table below. Other errors can also be returned that are passed through from the file system, or from a CryptoAPI when secure metabase data is being saved, or from registry operations.
Value | Description |
E_INVALIDARG | An argument was invalid. |
ERROR_INVALID_DATA | The data is invalid. |
ERROR_NOT_ENOUGH_MEMORY | Insufficient memory to perform the operation. |
ERROR_SUCCESS | The method succeeded. |
MD_ERROR_INVALID_VERSION | The specified version is invalid. |
MD_WARNING_INVALID_DATA | Invalid metabase data. |
MD_WARNING_PATH_NOT_FOUND | The specified path was not found. |