Migrating from IIS 6.0 to IIS 7.0 using MS Deploy

Author: Faith Allington

Published on March 23, 2008 by faith_a

Updated on May 13, 2008 by faith_a

Average Rating  Rate It (0)

RSS

This article will guide you through the process of using MS Deploy to migrate a single web site from IIS 6.0 to IIS 7.0. To migrate the entire server, using the webserver60 provider instead of metakey=lm/w3svc/1.

Article Goal: To migrate a web site from IIS 6.0 to IIS 7.0. I’m running ASP.NET so I need to ensure it will work after migration.

Prerequisites

This article requires the following prerequisites:

• .NET Framework 2.0 SP1 or greater

• MS Deploy Beta 1

Note: If you have not already installed MS Deploy, see Installing MS Deploy.

Part 1 - View dependencies of the source

1. Get the dependencies of the web site by running the following command:

msdeploy -verb:getDependencies -source:metakey=lm/w3svc/1

2. Review the output of the dependencies and look for any script maps or installed components in use by the site. For example, if Windows Authentication is in use by the web site, you will see <dependency name="WindowsAuthentication" />.

3. If your site is inheriting any script maps, these will not be listed in the dependencies and you should also review the script maps for your site manually.

4. Compile a list of the components needed on the destination.

For detailed steps on analyzing the output of getDependencies, see Viewing Dependencies of a Web site.


Part 2 - Configure the target or destination machine

1. Review the list of dependencies and install them on the destination server.

For example, let’s assume you had the following in use for your web site:

• ASP.NET

• Windows Authentication

• Anonymous Authentication

Based on analyzing your dependencies, you would install those components and modules.

Part 3 – To migrate the site to the source server

1. Always make a backup of the destination server. Even if you are just testing, it allows you to easily restore the state of your server. Run the following command to backup an IIS 7.0 server:

%windir%\system32\inetsrv\appcmd add backup “PreMsDeploy”

2. Run the following command on the destination server to take an archive of the server for migration:

msdeploy -verb:sync -source:metakey=lm/w3svc/1 -dest:archivedir=c:\site1archive

3. Run the following command on the destination server to validate what would happen if a migrate was run:

msdeploy -verb:migrate -source:archivedir=c:\site1archive -dest:metakey=lm/w3svc/1 -whatif > msdeploymigrate.log

Note: If you don't wish to sync from an archive, you can sync using the remote service. Specify computerName with the name of your server, such as Server1. If you are not running on the default port and URL, you need to specify the full URL, such as http://Server1:8080/msdeploy. For example, change the source to
source:metakey=lm/w3svc/1,computerName=server1

3. After verifying the output, run the same command again without the whatif flag:

msdeploy -verb:migrate -source:archivedir=c:\site1archive -dest:metakey=lm/w3svc/1 -whatif > msdeploymigrate.log

Note: If you don't wish to sync from an archive, you can sync using the remote service. Specify computerName with the name of your server, such as Server1. If you are not running on the default port and URL, you need to specify the full URL, such as http://Server1:8080/msdeploy. For example, change the dest to
dest:metakey=lm/w3svc/1,computerName=server1

You are now done migrating your site. To verify, test browsing to the web site on the destination server. For troubleshooting help, see Troubleshooting MS Deploy.

Summary

You have now migrated a web site from a source IIS 6.0 server to a destination IIS 7.0 server, including viewing the dependencies, configuring the destination IIS 7.0 server and performing the migration.

Comments

  1. Submitted on Apr 04 2008 by
    mrhodes
    Is it possible part 3 step 2 should be 2. Run the following command on the source server to take an archive of the server for migration: Then copy the archive file to the destination server. instead of destination server - I am new at that but wouldn't doing both steps on the destination server be putting the same server on top of itself What am I missing - probably something sense no one else has commented - but I wanted clarification before trying this Thanks

You must Log In to comment.

Page view counter