IIS backup is the vital part in SharePoint disaster recovery. SharePoint in-built backup mechanisms (either STSADM or Central Admin Backup Wizard) doesn’t touch IIS at all.
In IIS6 under Windows Server 2003, this configuration data was maintained in a database known as the IIS Metabase. With Windows Server 2008 and IIS7, the Metabase has been replaced by a set of XML configuration files that are located in the %WINDIR%\System32\Inetsrv\Config folder.
Windows 2008 Options to backup restore IIS for SharePoint 2010/MOSS 2007:
Windows 2008 offers an excellent command line interface for IIS: Appcmd.exe, which resides under: %WINDIR%\System32\inetsrv folder. Here is how you can backup restore IIS 7 configuration.
To Backup IIS:
appcmd add backup <name-for-backup-folder>
To Restore IIS configuration from backup:
appcmd restore backup <name-of-backup-folder>
use appcmd /? for other available options.
PowerShell Way to back up/Restore IIS:
To get the IIS cmd-lets, we have to import WebAdministration Module in Powershell. This module get installed while we add IIS role to the server, but will not activated by default. So, Lets activate the IIS cmd-lets by importing:
To Backup IIS:
Backup-WebConfiguration -Name <Name-Of-the-Backup>
This will backup IIS and the backup will be saved under: c:\Windows\System32\inetsrv\backup
To Restore IIS:
Restore-WebConfiguration -Name <Name-Of-the-Backup>
View existing backups:
IIS 7 doesn’t include user interface for backup restore. But you can download the “Backup/Restore UI Module” from http://www.iis.net/community/default.aspx?tabid=34&g=6&i=1892, But not sure about the reliability since it wont be.
MOSS 2007- Windows 2003 IIS Backup Options:
1. IISBack :shipped with windows 2003, located at: C:\WINDOWS\system32\
while backup the IIS, You got to give the password. This is called “portable backup”, and you will be able to restore the backup on different servers. If you don’t give, you will be able to backup, but it wont allow you to restore on other servers! This is called non-portable backup, because the machine key is used and we’ll have to restore it to the same machine.
KB on How To Create a Metabase Backup: http://support.microsoft.com/kb/324277
2. Using IIScnfg.vbs:
IIS 6 backup restore configuration:
Compared with iisback – IIScnfg.vbs with Import/Export gives you a lot of options. You can Export/Import using command line: IIScnfg, Its actually a VBScript shipped with windows 2003. You have to register the IIScnfg once before using it. (Just type IIScnfg, which will pop a msgbox with “This script does not work with WScript” and then another with confirmation, finally success msg)
To Backup IIS 6 Metabase:
IIScnfg /export /sp /lm /children /inherited /d <password> /f c:\IISconfig.bak
IISCNFG /import /dp /lm /sp /lm /children /inherited /d <password> /f c:\IISconfig.bak
More Info on IISBack & IIScnfg: http://technet.microsoft.com/en-us/library/cc727916%28v=ws.10%29.aspx
Backup/Restore via UI:
1) Open IIS Manager (Start > Run > Inetmgr)
2) Right Click on Local Computer > All Tasks > Backup/Restore Configuration
3) Click on “Create Backup” and then provide name for Backup, Provide Password and click OK.
4) This will create two files with .SC0 and MD0 extentions under c:\windows\system32\inetsrv\MetaBack folder
Restoring IIS 6.0 Metabase:
1) Copy the files created during backup to your existing/new server.
2) Open IIS Manager
3) Right Click on Local Computer > All Tasks > Backup/Restore Configuration
4) Select the file you want to restore and then provide the password
How about Home directories (Inetpub), Customized Web.config, Digital certificates & Add-ons?
All these techniques discussed above will **NOT** backup your IIS Home directories/Files. You have to have a File system backup for IIS Virtual directories.
If your solution package copies, retracts the customization Properly, the below steps may not be necessary. You may be having customizations like assemblies, resource files, site maps, etc. in your IIS folders (like _app_bin), IIS Add-ons (like URL Rewrite Module), compression, etc. Make clear documentation of all of these and
SSL certificates provide secure HTTPS communications between SharePoint and client browsers. SSL Certificates are not stored within Web sites or captured when an IIS configuration backup is performed, IIS just keeps the association between the site & certificates, which will usually reside under the server’s local disk. In case of a disaster, we must restore the certificates configuration.
Third party solutions: There are many third party solutions available to fill the gap: