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.back to the top Create an Administrative Backup of the IIS 6.0 MetabaseNOTE
: You must have administrator permissions to perform this task. There is no need to stop the IIS service.
back to the top Create a Metabase Backup Programmatically
- Click Start, point to Administrative tools, and then click Internet Information Services.
- Right-click the name of your computer in IIS Manager, point to All Tasks, and then click Backup/Restore Configuration.
- 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.
- 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.
- Click Close, and then quit IIS Manager.
- 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.
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.
back to the top The Metabase History Feature
- At a command prompt, type cd %Systemroot%\System32.
Iisback.vbs is located in this directory.
- 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]
- For example, you can run the following script:
Cscript.exe iisback.vbs /s <YourServerName> /u Administrator /p <YourAdminPassword> /backup /b NewBackup0606202
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:
You can roll back the metabase from the history files. To do this, follow these steps:
back to the top
- In IIS Manager, click the Computer icon under Internet Information Services.
- On the Action menu, point to All Tasks, and then click Backup/Restore Configuration.
- Under Previous backups, click one of the Automatic Backup files in the list, and then click Restore.