Rolling Back the Metabase Using History Files

IIS periodically creates backup files called history files when the history feature is enabled. The history files are copies of the metabase configuration file (MetaBase.xml) and the matching metabase schema file (MBSchema.xml). Restoring the metabase from history files is similar to restoring the metabase from backup files.

important Important You must be a member of the Administrators group on the local computer to perform the following procedure (or procedures), or you must have been delegated the appropriate authority. As a security best practice, log on to your computer using an account that is not in the Administrators group, and then use the Runas command to run IIS Manager as an administrator. From the command prompt, type runas /user:administrative_accountname "mmc %systemroot%\system32\inetsrv\iis.msc".

To restore the metabase using IIS Manager

  1. In IIS Manager, right-click the local computer, point to All Tasks, and click Backup/Restore Configuration.
  2. In the Backups list, click the Automatic Backup you want to restore, and then click Restore.
  3. Read the message that appears and click Yes if you want to continue.
  4. Click OK.

You may find it necessary to restore the metabase without using IIS Manager. For example, if a configuration change is made improperly or if it is made with incorrect Extensible Markup Language (XML) syntax, and IIS Manager is unable to enumerate the metabase, use the following procedure to restore the metabase.

To manually restore the metabase

  1. Open a command prompt. From the Start menu, click Run.

  2. In the Open box, type cmd, and then click OK.

  3. Stop the IIS services. At the command prompt, type iisreset /stop, and then press ENTER. The command prompt displays the following:
    Attempting stop...
    Internet services successfully stopped

    If the IIS services do not stop, and it is possible to restart the computer, type iisreset /stop /rebootonerror, and then press ENTER.

  4. Make copies of your current metabase files. At the command prompt, type cd systemroot\System32\Inetsrv, and then press ENTER to navigate to the folder where the files are. Next, type copy MBSchema.xml MBSchema.old, and then press ENTER to copy the schema file. Finally, type copy MetaBase.xml Metabase.old, and then press ENTER to copy the metabase configuration file.

  5. Locate the metabase history files. At the command prompt, type cd systemroot\System32\Inetsrv\History, and then press ENTER.

  6. Select the version of history files that you want. At the command prompt, type dir, and then press ENTER. All of the files appear in the following format:

    <date>  <time>   <file size> MBSchema_<identifying number>0000000000.xml
    <date>  <time>   <file size> MetaBase<identifying number>_0000000000.xml
    
    When you roll back the IIS metabase, you need matching metabase schema and configuration files. Select matching files by their identifying number.

  7. Copy the chosen history schema file over the existing metabase schema. At the command prompt, type copy /y MBSchema_<identifying number>_0000000000.xml systemroot\System32\Inetsrv\MBSchema.xml, and then press ENTER. With this command, you copy the file and rename it at the same time.

  8. Copy the matching history configuration file over the existing metabase configuration. At the command prompt, type copy /y Metabase_<identifying number>_0000000000.xml systemroot\System32\Inetsrv\MetaBase.xml, and then press ENTER. Again, this command copies the file and renames it at the same time.

    important Important If you mix up the names or copy a schema and configuration file that do not match, the rollback will fail when you start the IIS services.

  9. Restart IIS. At the command prompt, type iisreset /start, and then press ENTER. The command prompt displays the following:
    Attempting start...
    Internet services successfully started

    If the IIS services do not restart, repeat these steps beginning at step 4, and copy a different set of history files over the current metabase files.

phrase 1, phrase 2, phrase 3