The following section describes how to locate and backup ASP.NET configuration files for applications running under IIS 6.0, and on IIS7.0 and above.
Internet Information Services 6.0
In IIS 6.0 running on Windows Server 2003, web.config files are only used by ASP.NET web applications. Therefore, it is recommended to back up the entire hierarchy of your config files from all of the websites, virtual directories, and web applications within IIS. In the IIS Manager, right-click and open the website, directory, or application and go to the physical folder where it's web.config file is located. Each website/directory/application will have a maximum of one web.config file. Make sure to back up the config files and ensure their order is intact while backing up.
In the above scenario, the root of the Default Web Site may have its own web.config file. Application1 under the Default Web Site may also have its own web.config file, and so on. It is a good practice to backup the metabase.xml file (for IIS related configuration settings) and all the Web.config files for ASP.NET applications on a regular basis.
Internet Information Services 7.0 and above
Read more: MS Support