Share via


IMSAdminBase2::RestoreWithPasswd

The RestoreWithPasswd method restores the metabase from a backup file. The restoration requires the same password that was used to encrypt the backup file.

HRESULT RestoreWithPasswd(
      LPCWSTR pszMDBackupLocation,
      DWORD dwMDVersion,
      DWORD dwMDFlags,
      LPCWSTR pszPasswd
);

Parameters

  • pszMDBackupLocation
    [in] A string of up to 100 characters (ADMINDATA_MAX_NAME_LEN) that specifies the backup location. If an empty string is specified, the backup will be stored in the default location.

  • dwMDVersion
    [in] Specifies the version number of the backup to be restored from the backup location, or can be the constant MD_BACKUP_HIGHEST_VERSION which restores from the highest existing backup version in the specified backup location.

    Value

    Meaning

    MD_BACKUP_HIGHEST_VERSION

    Overwrite the highest existing backup version in the specified backup location.

  • dwMDFlags
    [in] Reserved. Must be zero.

    Value

    Meaning

    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.

  • pszPasswd
    [in] Unencrypted valid password for targeted computer. This password must be the same as the one used when the BackupWithPassword method was invoked.

Requirements

Client: Requires or Windows XP Professional.

Server: Requires or Windows Server 2003.

Product: IIS

Header: Declared in iadmw.h; include iiscnfg.h.