Metabase Backup Utility

The IIS metabase is a large and complicated structure, and is home for a potentially huge amount of vital information about your Internet sites. With all that complexity, and so much riding on the metabase remaining authentic, valid, and uncorrupted, it shouldn't be a surprise that backing up the metabase has been made into a relatively easy affair. This tool demonstrates how you can create a tool that makes backing up the metabase even easier.

All metabase backup functionality is provided at the IIS://LocalHost level, so this string is passed to GetObject to get a reference to the local machine object. The Backup method is then invoked with several parameters, including a location, version number, and a number of flags. You needn't worry about the flags, but the other two parameters bear mentioning. The location refers to a name that you give to your set of backup versions. Backup implementation will most likely change in the future, but at the time of this writing, all backups are stored in the same directory. Therefore, it might be helpful, and less confusing, to think of location as the name of a series of backup snapshots.

The backup version parameter can be explicit, or you can use one of several special values, the most important being &HFFFFFFFF. This value, which equals -1 in VBScript, indicates that the Backup method should assign a version number to this backup that is one higher than the highest version number found for that location.

This sample is provided for educational purposes only. It has not been tested in a production environment, and Microsoft® will not provide technical support for it.

This script is available in the Internet services directory, at ...\iissamples\sdk\admin\metaback.vbs.


© 1997 by Microsoft Corporation. All rights reserved.