How to Make an IIS 6.0 Metabase 'Exportable'
When a %windir%/system32/inetsrv/metabase.xml file is transplanted from an IIS 6.0 server to the inetsrv directory of another IIS 6.0 sever, the IISAdmin service on the target server won't run. This is by design. This happens because important portions of the metadata are encrypted by a "c23 key" that is unique to the source IIS server. The c23 key on the target server is also unique and cannot decrypt that which was encrypted by another c23 key. Even if you save the metabase.xml file to a safe location, uninstall and reinstall IIS, and attempt to use the saved metabase.xml file, you run into the same problem. The c23 key has been recreated. And if the metabase.xml file can't be decrypted, the IIS servcies aren't going to be starting.
One little-known way around this obstacle is to take advantage of the "Encrypt backup using password" option given in the IIS metabase backup wizard. Even among those who know the how and why of making metabase backups it seems rare that administrators understand the significance of this encryption option. In my early days with IIS 6.0 I assumed that the wizard was only offering me the option to protect the metabase backup such that no other administrators could restore to it unless they knew the password. KB article 324277 sings this same song. But somewhere in the past years the helpful tip was pointed out to me that this option is also enables an administrator to encrypt the metabase backup with their own password rather than with the unique c23 machinekey. If you use your own password to do the encryption, you can then move that backup from the %windir%/system32/inetsrv/MetaBack folder on the source server to the same folder on the target server. On the source server you can run the metabase backup/restore wizard, select the imported backup, begin the restore, supply your password, and watch the IIS services start. The IIS configuration on the target server should then be practically identical to the source server. (But you may have to edit IP bindings.)
I'm a big fan of metabase backups. I like to back the metabase up before any major changes to IIS configuration (changes to sites, adding application pools, removing isapi filters, etc.), test my changes, and make a new metabase backup when I've become comfortable with the changes. If there is the slightest idea in my mind that I might end up reinstalling IIS I'm especially quick to make the backup using my own password for encryption. When filling the field for the name of the backup I even type the password as part of the name. (So I don't have to remember it.)
Other ways to accomplish similar migrations would include Microsoft's IIS 6 Migration tool, Microsoft's Web Deployment Tool, or ADSonline's IISExport tool. But those may have to wait for another blog.
References:
https://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/d40b56ee-90d4-45e1-9b82-4aaea90eb02e.mspx?mfr=true
Backing Up and Restoring the Metabase in IIS 6.0 (IIS 6.0) > To create a portable backup (password required)
https://support.microsoft.com/default.aspx?scid=kb;EN-US;324277
324277 How To Create a Metabase Backup by Using IIS 6.0 in Windows Server 2003
https://support.microsoft.com/default.aspx?scid=kb;EN-US;300672
300672 How to create a metabase backup in IIS 5
https://support.microsoft.com/default.aspx?scid=kb;EN-US;302573
302573 How To Back Up and Restore IIS
https://support.microsoft.com/default.aspx?scid=kb;EN-US;302888
302888 How To Schedule Metabase Backups Using WSH
https://www.microsoft.com/technet/scriptcenter/scripts/default.mspx?mfr=true
https://www.microsoft.com/technet/scriptcenter/scripts/iis/default.mspx
https://www.microsoft.com/technet/scriptcenter/scripts/iis/iis6/default.mspx
Search for: Back Up the Metabase Using a Password {Scripts for iis 5, 5.1 and 6.0}
814866 Common tasks for administration of IIS 6.0
https://support.microsoft.com/default.aspx?scid=kb;EN-US;814866
https://sanal.org/story/discover-the-iis-metabase-unlock-the-details-of-your-web-server-configuration-2/
Discover the IIS Metabase: Unlock the Details of Your Web Server Configuration
https://www.iis-aid.com/articles/how_to_guides/backing_up_and_restoring_your_iis_6_metabase
Backing up and Restoring your IIS 6 Metabase
https://www.ms2.cn/downloads/details.aspx?FamilyId=2AEFC3E4-CE97-4F25-ACE6-127F933A6CD2&displaylang=en
Internet Information Services 6.0 Migration Tool
https://www.iis.net/downloads/default.aspx?tabid=34&g=6&i=1602
Microsoft Web Deployment Tool - Tech Preview 1 - x86
https://www.adsonline.co.uk/IISExport/ - IISExport
https://support.microsoft.com/default.aspx?scid=kb;EN-US;887417 - {discusses iissync.vbs and iiscnfg.vbs for IIS in a clustered scenario}
TechNet Webcast: IIS 6.0: IISCNFG.vbs versus IISBack.vbs
IIS6: Restoring Metabase Configuration to a New Server
Comments
- Anonymous
November 09, 2014
I'm getting ready to reinstall Windows on my laptop, so this is great information. I came across a comment in another blog that said the backup/restore method would not work if you reinstall IIS, but they did not go into details on how to get around the problem. Your blog has saved me a lot of time and headaches. Thanks!