IIS 7 was developed to overcome the shortcoming of IIS 6. New features were added with the release of IIS 7. You can easily migrate your website from IIS 6 to IIS 7 to experience the new technology and become faster & efficient.
This guide will explain how you can migrate your website (configuration settings, content & certifications) from IIS 6 to IIS 7 using a Web Deployment Tool.
- Web Deployment Tool
- Website in IIS 6 server
- Target IIS 7 server
- Installation dependencies
Before initiating the migration process,
msdeploy -verb:getDependencies -source:metakey=lm/w3svc/1
The value 1 represents the default website
Review the output and look for any scripts or components that are currently used by the site. If the site uses Windows authentication, then it will show <dependecy name= “WindowsAuthentication” />
If the dependencies and components are not the same, then the migration will not complete. You can remove unwanted components or dependencies from the XML file in the backup directory.
Now, you are ready to migrate your website from IIS 6 to IIS 7.
To create a backup of the destination server, run the following command in the Web Deploy tool.
%windir%system32inetsrvappcmd add backup "PreMsDeploy"
After setting up a backup, you can compress it to an archive using the command below
msdeploy -verb:sync -source:metakey=lm/w3svc/1 -dest:archivedir=c:mysitearchive
Now, You can validate the effect of a migration by executing the command on the destination server.
msdeploy -verb:migrate -source:archivedir=c:mysitearchive -dest:metakey=lm/w3svc/1 -whatif> msdeploymigrate.log
msdeploy -verb:sync -source:package=c:mysitearchive -dest:metakey=lm/w3svc/1 > WebDeploySync.log
This concludes the migration of the website from IIS 6 to IIS 7. Some components like PHP, AJAX, ASP.NET needs to be configured after the migration independently by matching the configuration from the source IIS 6 server.
In this guide, you learned how to successfully migrate a website from IIS 6 to IIS 7 by reviewing the dependencies, configuring the destination IIS server and using a Web Deployment tool.