Backing Up and Restoring the IIS Metabase

IIS administrators can create backup files using either IIS Manager or a command-line administration script. The backup files are portable copies of the metabase configuration file (MetaBase.xml) and the matching metabase schema file (MBSchema.xml). By using the metabase configuration backup/restore feature, you can restore the metabase from the backup files.

Backing Up the IIS Metabase

Using the configuration backup/restore feature, you can create complete backup copies of the IIS metabase. Metabase backup files provide a way to restore your metabase configuration and schema data in the event that your metabase becomes corrupted. Backup files can be restored either to the computer on which the backup was made or to other installations of the Windows.NET Server family.

Backup files contain only configuration data; they do not include your content. To back up your content as well, use the Windows Backup feature. For more information, see "Backing up and Restoring Data" in Windows Help.

note Note The metabase is locked while the backup is in progress.

Secure Backup

When creating a secure backup, the administrator provides a password that is used by IIS to encrypt the backup files. The password is encrypted and stored in the header of the backup file. Only the administrator password and secure properties within the backup files are encrypted; all other information within the backup files are plaintext. After the backup file is encrypted, the password within the backup file cannot be changed.

Nonsecure Backup

When creating a nonsecure backup, the administrator does not supply a password. Therefore, nonsecure backup files are encrypted with a blank password, which allows any member of the Administrators group to restore the metabase using nonsecure backup files. Only the blank password and secure properties are encrypted; all other information within the backup file is plaintext.

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 back up the IIS metabase

  1. In IIS Manager, right-click the local computer, point to All Tasks, and click Backup/Restore Configuration.
  2. Click Create Backup and type a name for the backup file in the Configuration backup name box. Note that the backup name is not case-sentitive.
  3. Optional: If you want to create a secure backup, select the Encrypt backup using password check box, type a password in the Password box, and then type the same password in the Confirm password box.
  4. Click OK.

When a backup is created, a set of two files is created and named in the following format:
name.mdx
name.scx
where name is the name that the administrator uses to name the backup set, and x is the version number of the backup set, starting with 0 (zero). The version number is increased by one for each backup set that uses the same name. For example, if you use the name mybackup as the name of your backup set twice, mybackup.md0 and mybackup.sc0 are created on the first backup; on the second backup, the files are named mybackup.md1 and mybackup.sc1. By default, backup files are stored in the systemroot\System32\Inetsrv\MetaBack folder.

Restoring an IIS Metabase Backup

You can restore a metabase backup to the same computer on which the backup was made, or onto a different computer. Because a metabase backup does not include content files, if you restore a metabase backup to a different server, you must copy your content files as well. The content files must exist in the same location and on the same drive used on the original server. Restoring a backup from an earlier version of IIS is not supported.

important Important Before restoring a metabase from one computer to a different computer, you must first delete the machine-specific information from the metabase file. For important information on this issue, see Machine-specific and System-specific Information, and Copying IIS Configurations.

To restore an IIS metabase backup

  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 backup you want to restore and click Restore.
  3. Read the message that appears and click Yes if you want to continue.
  4. If you are restoring a secure backup, you are prompted for the password you typed when the backup was created. Type the password and click OK. Note that passwords are case sensitive.
  5. Click OK.

SSL Certificates

If you use a Secure Sockets Layer (SSL) certificate on your Web server and you restore the metabase backup to a different installation of the operating system, an error occurs if the certificate is not available or installed. If a site's SSL certificate is missing, connections are dropped, and IIS displays a "page unavailable" message. The server logs the following warning in the event log: "The solution is to reinstall the certificate into the same certificate store and restart IIS. Failure to restart IIS after reinstalling the certificate results in continued error logs and dropped connections."

  • For information on backing up and restoring the IIS metabase using a command-line administration script, see Managing IIS Configurations.
  • For information about metabase key names and paths, property inheritance, security, and reliability, see Metabase Structure.