IIS 7 automatically makes history snapshots of ApplicationHost.config each time a change is detected. By default, IIS checks for a new version every 2 minutes and keeps 10 prior versions of the file.
IIS 7 stores these snapshots in the %systemdrive%\inetpub\history folder by default. You can change any of these settings by editing the <system.applicationHost/configHistory> section in ApplicationHost.config.
To backup the IIS configuration, you will have to run the following command:
%windir%\system32\inetsrv\appcmd.exe add backup "Backup-Name"
To restore the IIS config file backup, run this command:
%windir%\system32\inetsrv\appcmd.exe restore backup "Backup-Name"
To get a list of backups and configuration history files, run the following command:
%windir%\system32\inetsrv\appcmd.exe list backup