Howto: Migrate IIS Sites to Another Server

First you need to install the  IIS 6.0 Migration Tool

For each Web site and virtual directory on the source server, you must create a corresponding Web site and virtual directory on the target server. Later in the migration process, you will copy the content into these Web sites and virtual directories.

Create the Web sites and virtual directories by completing the following steps:
1. Create the Web sites and home directories on the target server.
2. Create the virtual directories.

Now let’s create a .bat file:

cd ..
cd ..
cd \
cd ..
c:
cd "Program Files (x86)"
cd "IIS Resources"
cd "IIS 6.0 Migration Tool"
iismt.exe server-name w3svc/1 /serverbindings 127.0.0.1:80:dev-site2.example.com /siteid 1 /configonly
iismt.exe server-name w3svc/2 /serverbindings 127.0.0.1:80:qa-site2.example.com /siteid 2 /configonly
iismt.exe server-name w3svc/3 /serverbindings 127.0.0.1:80:stage-site2.example.com /siteid 3 /configonly
iismt.exe server-name w3svc/4 /serverbindings 127.0.0.1:80:site2.example.com /siteid 4 /configonly
iismt.exe server-name w3svc/5 /serverbindings 127.0.0.1:80:loadtest2.example.com /siteid 5 /configonly
cd ..
cd ..
cd \
cd usr
cd netsite-docs
Adsutil2.vbs append w3svc/1/serverbindings "127.0.0.1:80:dev-site.example.com"
Adsutil2.vbs append w3svc/2/serverbindings "127.0.0.1:80:qa-site.example.com"
Adsutil2.vbs append w3svc/3/serverbindings "127.0.0.1:80:stage-site.example.com"
Adsutil2.vbs append w3svc/4/serverbindings "127.0.0.1:80:site.example.com"
Adsutil2.vbs append w3svc/5/serverbindings "127.0.0.1:80:loadtest.example.com"
Adsutil2.vbs append w3svc/1/serverbindings "127.0.0.1:80:dev-site.preview.example.com"
Adsutil2.vbs append w3svc/2/serverbindings "127.0.0.1:80:qa-site.preview.example.com"
Adsutil2.vbs append w3svc/3/serverbindings "127.0.0.1:80:stage-site.preview.example.com"
Adsutil2.vbs append w3svc/4/serverbindings "127.0.0.1:80:site.preview.example.com"
Adsutil2.vbs append w3svc/5/serverbindings "127.0.0.1:80:loadtest.preview.example.com"
Adsutil2.vbs append w3svc/4/serverbindings "127.0.0.1:80:site.asp.example.com"
Adsutil2.vbs append w3svc/5/serverbindings "127.0.0.1:80:cms.preview.example.com"
pause

You will need to replace 127.0.0.1 with the ip of the server you want to copy the config settings to.  The second part using adsutil2.vbs is used to add addtional host headers to site names

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.