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.
NOTE: You must have administrator permissions to perform this task. There is no need to stop the IIS service.
- 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.
NOTE: You must have administrator permissions to perform this task.
- 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>]
/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.
/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
- 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.