Share via


About Metabase Import and Export

The metabase import and export feature enables administrators to create an export file, named MetaBase.xml by default, that contains specifically selected elements of a metabase configuration file. This export file can later be imported into the metabase configuration file of the same computer, or to another computer running a member of the Microsoft Windows.NET Server family.

Additionally, you can use the metabase export feature to create a metabase template, which can be used to configure multiple computers with the same IIS configuration settings, excluding machine- and system-specific information. For more information about metabase templates, see Restoring an Individual Section of the Metabase.

Metabase export does not replace the functionality of metabase backup because it does not include encrypted properties. Metabase backup is used to create backup files of the entire metabase configuration and schema, which can be restored only in its entirety, including encrypted properties. Metabase export cannot be used to export the metabase schema.

note Note Neither the metabase backup nor export feature can be used to save or copy content files, scripts, or binaries. To back up your your entire server, including content files, scripts, and binaries, use an application such as "Windows Backup" in Windows Help. To simply copy these files to a new location, use an application such as Windows Explorer or the Windows xcopy command. Remember to reregister any components that you copy to a new computer.

Specifying Metabase Elements for Import or Export

You can import and export the following metabase elements:

  • All Web site configurations or a single site configuration
  • All FTP site configurations or a single FTP site configuration
  • All SMTP site configurations or a single SMTP site configuration
  • All NNTP site configurations or a single NNTP site configuration
  • An IIS application configuration
  • A directory, virtual directory, or file configuration properties
  • All application pool configurations or a single application pool configuration

For information on the elements that can be exported, and later imported, see Metabase Import and Export.

Importing and Exporting a Metabase Element

To import or export a metabase element, you can use any of the following:

Regardless of whether you use a programmatic interface, a script, or IIS Manager to import and export metabase elements, there are specific choices you must make. The following list outlines both the required and optional steps needed to import and export a metabase element. The inheritance and merge options are discussed later in this topic.

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".

Before Exporting a Metabase Element

  • Select a metabase element to export.
  • Specify the name and location of the .xml file to contain the exported element.
  • Optionally choose to export inherited properties.
  • Optionally choose to export lower-level (child) subkeys recursively.
  • Optionally encrypt the export file with a password that you provide.

When a metabase element is exported, IIS creates an .xml file containing the exported element or elements.

Before Importing a Metabase Element

  • Specify a metabase export file to import.
  • Specify an element within the export file to import.
  • Optionally choose to import inherited properties.
    The export file must contain inherited properties for this option to be available.
  • Optionally choose to import lower-level (child) subkeys recursively.
    The export file must contain lower-level (child) subkeys for this option to be available.
  • Specify the password, if any, that was used to encrypt the export file.
  • Optionally choose to merge the settings from the export file into the metabase configuration.
  • If you intend to import a metabase element to another computer, you must first change the system- and machine-specific information in the export file. For machine- and system-specific information, see Machine-specific and System-specific Information.

Inherit and Merge Options

If you select the inherit option during a metabase export, inheritable properties that are applicable to the metabase element are saved as part of the export file. If the inherit option is enabled during an import operation, these inheritable properties are imported into the metabase.

The behavior of importing inheritable settings differs, depending on whether the merge option is used along with the inherit option.

For example:

  • If you import a metabase element using the inherit option without the merge option, inherited properties are imported into the metabase, unless the property already exists at the same location in MetaBase.xml. (If the value of the property differs between the export file and the MetaBase.xml file, the value of the property in the MetaBase.xml file remains unchanged.)
  • If you import a metabase element using the inherit option with the merge option, inherited properties are imported into the metabase, and the value of the properties that already exist at the same location in MetaBase.xml are overwritten. (If the value of the property differs between the export file and the MetaBase.xml file, the value of the property in the MetaBase.xml file is overwritten with the value from the export file.)

important Important Inherited properties affect the configuration of all sites. Use caution when importing a metabase element using the inherit option.

Export Lower-Level Subkeys

When specifying a metabase element to export, you can optionally export lower-level (child) subkeys. If an element is exported using this option, you can optionally import an element and all recursive subkeys.