I have a number of applications currently running on a Windows Server 2003 system. We'd like to migrate one of those applications to IIS7 on a Windows Server 2008 R2 box. This is a new web server, has IIS installed, but nothing else.
I know how to migrate the entire server, and even the entire site, but how do I migrate the server-wide settings, the site-wide settings, the app pool used by the application and then the application itself?
The basic answer is: Use the Web Deployment Tool.
You'd use something like
msdeploy -sync -source:metakey=lm/w3svc/1 -dest:package=c:\backupSite.zip -enableLink:AppPool
(Where 1 is the IIS site identifier) on the source machine, and then the same thing in reverse on the target:
msdeploy -sync -source:package=c:\backupSite.zip -dest:metakey=lm/w3svc/1
While you're restoring it to an IIS7 server, you still need to use the same restoration target type as was specified as the source (i.e. metakey).
You can add -whatif to the end to view what it's planning to do.
More here: http://technet.microsoft.com/en-us/library/ff633422(v=WS.10).aspx
and here: http://learn.iis.net/page.aspx/427/migrate-a-web-site-from-iis-60-to-iis-7-or-above/
Here is the command that just got through working for me:
After this, I then deployed the application itself from the latest web deploy package.
I had a few problems. At first, when I clicked the "Default Web Site" in IIS Manager, I got an error that application "/" was not defined. I needed to set the site directory to
D:\inetpub\wwwroot
.Also, the above command accurately migrated the IP address of the original server. It was necessary to edit the bindings to use the correct IP address.
Other than that, everything looks good right now.