kwizcom banner advertisement

How to Backup/Restore IIS in SharePoint?

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 Backup/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:

Import-module WebAdministration

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
iis backup restore configuration

To Restore IIS:
Restore-WebConfiguration -Name <Name-Of-the-Backup>

View existing backups:
iis backup restore config powershell

IIS Cmdlets:

Need UI?
IIS 7 doesn't include user interface for backup restore. But you can download the "Backup/Restore UI Module" from, 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\

iisback /s <ServerName> /u Administrator /p <AdminPassword> /backup /b IISBackupUp /overwrite

iisback /restore /s <server-Name> /u <User-Name> /p <password> /b <backup-name>

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.

More info:

KB on How To Create a Metabase Backup:

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)
iis 6 backup restore configuration

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:

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

iis backup restore tool
iis 6 backup and restore
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
iis backup restore
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 customizations in Proper way, 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), compressions, etc. Make a clear documentation of all of these and

SSL Certificates:

SSL certificates provides secure HTTS 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 usually will reside under server's local disk. In case of a disaster, we must restore the certificates configuration.

Technet Article on Backup/Restore IIS 6.0 in windows 2003:

Third party solutions: There are many third party solutions available to fill the gap:
  1. SCDPM
  2. Commvault
Last but not least: There are lot of PowerShell code to Backup and Zip IIS. Here is one such:

How to Backup/Restore IIS in SharePoint? How to Backup/Restore IIS in SharePoint? Reviewed by Salaudeen Rajack on 5:42 PM Rating: 5

No comments:

Please Login and comment to get your questions answered!

Powered by Blogger.