{"id":17,"date":"2010-04-14T01:08:00","date_gmt":"2010-04-14T01:08:00","guid":{"rendered":"http:\/\/sdkit.com\/?p=17"},"modified":"2014-06-19T03:00:47","modified_gmt":"2014-06-19T03:00:47","slug":"how-to-backup-iis7-applicationhost-config-and-settings","status":"publish","type":"post","link":"https:\/\/sdkit.com\/?p=17","title":{"rendered":"How To: Backup IIS7 ApplicationHost.config and Settings"},"content":{"rendered":"<p>Internet Information Services 7 (IIS7) doesn&#8217;t use metabase-like file from IIS6. Instead the settings and configuration are stored in schema files and applicationHost.config files.<\/p>\n<p>Since the configuration files are different, the old IIS6 tools will not be able to backup IIS7 settings.<\/p>\n<p>This is the new script that you can use to backup your IIS7 web servers.<\/p>\n<p>1. Using notepad or any text editor create a file backupiis7.cmd<\/p>\n<p>2. Insert the following code and save the file:<\/p>\n<blockquote><p><\/p>\n<pre>@echo off<br\/>cls<br\/><br\/>pushd \"%WinDir%System32inetsrv\"<br\/><br\/>echo.| date | find \/i \"current\"&gt;datetime1.tmp<br\/>echo.| time | find \/i \"current\"&gt;datetime2.tmp<br\/><br\/>for \/f \"tokens=1,2,3,4,5,6\" %%i in (datetime1.tmp) do (<br\/>  echo %%n&gt;datetime1.tmp<br\/>)<br\/>for \/f \"tokens=1,2,3,4,5,6\" %%i in (datetime2.tmp) do (<br\/>  echo %%m&gt;datetime2.tmp<br\/>)<br\/>for \/f \"delims=\/ tokens=1,2,3\" %%i in (datetime1.tmp) do (<br\/>  set TMPDATETIME=%%k%%i%%j<br\/>)<br\/>for \/f \"delims=:. tokens=1,2,3,4\" %%i in (datetime2.tmp) do (<br\/>  set TMPDATETIME=D%TMPDATETIME%T%%i%%j%%k%%l<br\/>)<br\/><br\/>appcmd add backups %TMPDATETIME%<br\/><br\/>del datetime1.tmp<br\/>del datetime2.tmp<br\/><br\/>set TMPDATETIME=<br\/><br\/>popd<br\/>echo.<\/pre>\n<p><\/p><\/blockquote>\n<p>3. The IIS7 configuration will be backed up at the following path:<\/p>\n<blockquote><p><\/p>\n<pre>C:WindowsSystem32inetsrvbackup<\/pre>\n<p><\/p><\/blockquote>\n<p>NOTE: you can also use Task Scheduler to automate backups.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Internet Information Services 7 (IIS7) doesn&#8217;t use metabase-like file from IIS6. Instead the settings and configuration are stored in schema files and applicationHost.config files. Since the configuration files are different, the old IIS6 tools will not be able to backup IIS7 settings. This is the new script that you can use to backup your IIS7 &#8230; <\/p>\n<p class=\"read-more-container\"><a title=\"How To: Backup IIS7 ApplicationHost.config and Settings\" class=\"read-more button\" href=\"https:\/\/sdkit.com\/?p=17#more-17\" aria-label=\"Read more about How To: Backup IIS7 ApplicationHost.config and Settings\">Read more<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_crdt_document":"","_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[14,69,2,36],"tags":[],"class_list":["post-17","post","type-post","status-publish","format-standard","hentry","category-how-to","category-iis7","category-tutorial","category-windows","no-featured-image-padding"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/sdkit.com\/index.php?rest_route=\/wp\/v2\/posts\/17","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sdkit.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sdkit.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sdkit.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/sdkit.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=17"}],"version-history":[{"count":0,"href":"https:\/\/sdkit.com\/index.php?rest_route=\/wp\/v2\/posts\/17\/revisions"}],"wp:attachment":[{"href":"https:\/\/sdkit.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=17"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sdkit.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=17"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sdkit.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=17"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}