IIS服务所有文件都在这个目录下:\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修改。
本文转自today4king博客园博客,原文链接:http://www.cnblogs.com/jinzhao/archive/2012/08/01/2618084.html,如需转载请自行联系原作者