参考文章:http://blogs.iis.net/bills/ar
chive/2008/03/24/how-to-backup-restore-iis7-configuration.aspxIIS服务所有文件都在这个目录下:\windows\system32\inetsrv\
文件方式:拷贝或者覆盖整个\windows\system32\inetsrv\config文件夹以及子目录就可以了
通过命令行方式:
to backup configuration, run the follow command:
> %windir%\system32\inetsrv\appcmd.exe add backup "My Backup Name"
to restore that backup, run this command:
> %windir%\system32\inetsrv\appcmd.exe restore backup "My Backup Name"
to delete a backup, run this command:
> %windir%\system32\inetsrv\appcmd.exe delete backup "My Backup Name"
list of backups and configuration history files, use the following command:
> %windir%\system32\inetsrv\appcmd.exe list backup
PS:从IIS7开始,每隔两分钟就会自动检查ApplicationHost.config文件并会自动备份最近十个版本到History目录,这个策略可以在<system.applicationHost/configHistory> section修改。