views:

4176

answers:

4

I'm new to the IIS world but am wondering the best practice for moving a website to another server (along with all settings, etc.)

  • Manually recreate the site on the new server (not maintainable for obvious reasons)
  • Copy the applicationHost.config settings file
  • Use appcmd to make a backup and restore
  • Use MSDeploy to publish the site on the new machine
  • Use a 3rd party tool

Just wondering what others' experiences have been. Thanks!

+7  A: 

I'd say export your config

In IIS manager, you need to export the config from server 1. In IIS manager, click the Server node, and go to Shared Configuration under Management and Click “Export Configuration”. You can use a password if you are sending them across the internet, if you are just gonna move them via a USB key then don't sweat it.

Move these files to your new server

administration.config
applicationHost.config
configEncKey.key

On the new server, go back to the “Shared Configuration” section and check “Enable shared configuration.” Enter the location in physical path to these files and apply them.

It should prompt for the encryption password(if you set it) and reset IIS.

BAM! Go have a beer!

chews
Awesome, thanks for the tip! I was looking for exactly this.
kurious
One small tip.... I kept getting Service Unavailable on my second machine. When checking the Event Viewer it talked about a DLL that it couldn't load. This happened because I had different options selected in Windows Setup on the main box.
hacker
+1  A: 

MSDeploy can migrate all content, config, etc. that is what the IIS team recommends. http://www.iis.net/extensions/WebDeploymentTool

Bill Staples
Thanks Bill -- I had seen the tool but was wary because it was still in Beta.
kurious
+1  A: 

Is there a way to export just one site from one IIS7 server to another?

Praveen
To answer my own question; unfortunately, there is no way to export a site from one server to another. Wonder why MS thought it would be a good idea to entirely omit that feature. And I have tried this Shared Configuration thing on 7 and it is reaaally buggy!
Praveen
A: 

Just want to say that the procedure from 'chews' won't work, if you want to move a 7.0 config to a IIS 7.5 server (2008 R2). The process will succeed but the management console will not load properly after the import (a lot of error messages in the eventlog about modules it can't find because of the wrong version).

Fabian