Tuesday, December 11, 2012

IIS 7 Backup /Restore


Internet Information Services (IIS) turns a computer into a Web server that can provide World Wide Web publishing services, File Transfer Protocol (FTP) services, Simple Mail Transport Protocol (SMTP) services, and Network News Transfer Protocol (NNTP) services. You can use IIS to host and manage Web sites and other Internet content once you obtain an IP address, register your domain on a DNS server, and configure your network appropriately.

IIS is Microsoft's entry to compete in the Internet server market that is also addressed by Apache, Sun Microsystems, O'Reilly, and others. With IIS, Microsoft includes a set of programs for building and administering Web sites, a search engine, and support for writing Web-based applications that access databases.

Microsoft includes special capabilities for server administrators designed to appeal to Internet service providers (ISP). It includes a single window (or "console") from which all services and users can be administered. It's designed to be easy to add components as snap-ins that you didn't initially install. The administrative windows can be customized for access by individual customers.


AppCmd Add Backup
This method allows you to take a new backup of IIS. Execute the command as follows:
appcmd add backup “backupname”


This will create a new backup within IIS of your configuration with the title “backupname”. You can then use the following command to restore it:



AppCmd Restore Backup
This method allows you to restore an existing backup of IIS. Execute the command as follows:
appcmd restore backup “backupname”


This will restore the backup called “backupname” from within IIS. Note that IIS will be restarted during this process. You can tell AppCmd not to restart IIS by issuing the following parameter on the end of the command: /stop:false.


AppCmd List Backup
This command will allow you to list all stored backups. Issue as follows:
appcmd list backup


 This command can be used to find backups you wish to restore or delete.



AppCmd Delete Backup
To purge an existing backup, simply run:
appcmd delete backup “backupname”







========================================================================



For further information, you can always run
appcmd backup /?
and for each individual tool help,
appcmd add backup /?



======================================================================

There is no inbuild GUI process or option to restore/backup the IIS 7. But you can perform this using IIS7BackupRestoreUI.dll. It’s pretty simple… It would ONLY take backups if the configuration store is local (shared configuration is not supported as of now. You need to Add Module IIS7 Backup Restore UI.
IIS7 Backup Restore UI
i.e. Local - your applicationHost.config and other files are present in %WinDir%\system32\inetsrv\config folder

To add this module in your IIS 7 manager follow the below steps:

  1. Download the zip file containing the IIS7BackupRestoreUI.dll (Easily available on Microsoft site)

  1. From inetsrv folder Drag and Drop the IIS7BackupRestore.dll into the Global Assembly Cache (C:\Windows\assembly) or from a command line run
     gacutil –i IIS7BackupRestore.dll to insert it into your Global Assembly Cache.

  1. Under File Menu, browse for the file %WinDir%\System32\InetSrv\config\Administration.config and open it in your favorite text editor.

  1. Search for the <moduleProviders> section and add the following line,
<add name="IIS7BackupRestoreUI" type="IIS7BackupRestoreUI.MyModuleProvider, IIS7BackupRestoreUI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=db9daa3d2ea5f6fd" />

  1. Search for the <modules> section of the same file and add the following line:
<add name="IIS7BackupRestoreUI" />

  1. Open Inetmgr and You will see the module listed in your IIS 7 Manager if you would’ve followed the above steps properly.














No comments:

Post a Comment