How To Create a Metabase Backup by Using IIS 6.0 in Windows Server 2003

Article translations Article translations
Article ID: 324277 - View products that this article applies to.
This article was previously published under Q324277
Expand all | Collapse all

On This Page

SUMMARY

This step-by-step article describes how to create a metabase backup by using Internet Information Services (IIS) 6.0.

IIS 6.0 Administrative Metabase Backup

The metabase is a hierarchical structure for storing IIS configuration settings. It performs some of the same functions as the Windows system registry, but it is specific to IIS.

The metabase configuration and schema for Microsoft IIS 4.0 and Microsoft IIS 5.0 is stored in a binary file, which is not easily read or edited. IIS 6.0 replaces the single binary file (MetaBase.bin) with plain-text, XML-formatted files named MetaBase.xml and MSSchema.xml. These files are stored on your computer in the %SystemRoot%\System32\Inetsrv folder (note that C:\Windows is typically the system root folder). Only users who are members of the Administrators group can view and modify these files. IIS administrators can create backup file by using IIS Manager or a programmatic script. The backup files are copies of the metabase configuration file (MetaBase.xml) and the matching metabase schema file (MSSchema.xml). This article explains how you can easily back up the metabase so that you can recover administrative settings.

Create an Administrative Backup of the IIS 6.0 Metabase

NOTE: You must have administrator permissions to perform this task. There is no need to stop the IIS service.
  1. Click Start, point to Administrative tools, and then click Internet Information Services.
  2. Right-click the name of your computer in IIS Manager, point to All Tasks, and then click Backup/Restore Configuration.
  3. Click Create Backup in the Configuration Backup/Restore dialog box, and then type a name for this backup.

    NOTE: If you want to create secure backup, click to select the Encrypt backup using password check box in the Configuration Backup dialog box, type a password in the Password box, and then type the same password in the Confirm password box. The backup name cannot contain any symbols, just letters and numbers.
  4. Click OK to quickly back up the administrative settings in the metabase.

    The backup name and its date and time are now listed in the Previous Backups dialog box.
  5. Click Close, and then quit IIS Manager.
  6. To restore the metabase backup, right-click the name of your computer in IIS Manager, point to All Tasks, and then click Backup/Restore Configuration. Under Previous backups, select the file name that you want, and then click Restore. If prompted for a password, type the password.

Create a Metabase Backup Programmatically

In IIS 6.0, you can run a Vbscript file, Iisback.vbs, to create a metabase backup.

NOTE: You must have administrator permissions to perform this task.
  1. At a command prompt, type cd %Systemroot%\System32.

    Iisback.vbs is located in this directory.
  2. To use a metabase backup, use the following syntax and parameters:
    Syntax: IIsBack [/s <server> [/u <user name> [/p <password>]]] /backup
            [/b <BackupName>] [/v <VersionNumber>] [/e <BackupPassword>]
            [/overwrite]
    
    Parameters:
    
    Value                   Description
    /s <server>             Connect to computer <server> [Default: this system]
    /u <user name>           Connect as <user name> or <domain>\<user name>
                            [Default: current user]
    /p <password>           Password for the <user name> user
    /b <BackupName>         Description for the backup file.
                            [Default: "SampleBackup"]
    /v <VersionNumber>      Specifies the version number to be assigned to
                            the backup. Can be any integer, HIGHEST_VERSION,
                            or NEXT_VERSION. [Default: NEXT_VERSION]
    /e <BackupPassword>     Encrypt the backup file with the provided password
    /overwrite              Back up even if a backup of the same name and
                            version exists in the specified location,
                            overwriting if necessary. [Default: disabled]
    					
  3. For example, you can run the following script:
    Cscript.exe iisback.vbs /s <YourServerName> /u Administrator /p <YourAdminPassword> /backup /b NewBackup0606202
    					

The Metabase History Feature

By default, the Metabase History feature is turned on in IIS 6.0. The default value of the MaxHistoryFiles property is set to 10. The Metabase History feature automatically tracks changes to the metabase that are written to disk. When the metabase is written to disk, IIS marks the new Metabase.xml file with a version number and saves a copy of the file in the history folder. Each history file is marked with a unique version number, which is then available for the metabase rollback or restore processes. A pair of history files is made up of a MetaBase.xml and a MBSchema.xml file, named with the same major and minor version number, and stored in the history folder. These copies can be viewed only by users who are members of the Administrators group. You can find the history folder in the following location:
%Systemroot%\system32\inetsrv\history
You can roll back the metabase from the history files. To do this, follow these steps:
  1. In IIS Manager, click the Computer icon under Internet Information Services.
  2. On the Action menu, point to All Tasks, and then click Backup/Restore Configuration.
  3. Under Previous backups, click one of the Automatic Backup files in the list, and then click Restore.

Properties

Article ID: 324277 - Last Review: December 3, 2007 - Revision: 7.5
APPLIES TO
  • Microsoft Windows Server 2003, Datacenter Edition (32-bit x86)
  • Microsoft Windows Server 2003, Enterprise Edition (32-bit x86)
  • Microsoft Windows Server 2003, Standard Edition (32-bit x86)
  • Microsoft Windows Server 2003, Web Edition
  • Microsoft Windows Server 2003, 64-Bit Datacenter Edition
  • Microsoft Windows Server 2003, Enterprise x64 Edition
  • Microsoft Internet Information Services 6.0
Keywords: 
kbhowto kbhowtomaster kbwebservices kbappservices KB324277

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com