Mayank Tripathi
Mayank Tripathi

Reputation: 987

How can I copy all IIS setting, configurations, application pools from one IIS box to another?

I have an IIS box on windows server 2012 and I want to mirror image the same settings, application pools, web sites and other configurations in another server that is also windows server 2012. How Can I do that?

Is there any possibility to automate this process as I have to do this process very repetitively?

Upvotes: 8

Views: 31454

Answers (2)

Mayank Tripathi
Mayank Tripathi

Reputation: 987

I found a really genuine and effective way of migrating IIS(complete web application with all settings) using Microsoft Web Deploy. It does not depend on IIS version. There is an API web deploy api that we can use to do this. We can do this using command line arguments or an IIS extension is also available for the same that will ease your IIS migration. It can migrate

IIS Websites

  • Application Pools
    • Server certificates
    • Settings of application pools
    • Settings of websites
    • Authentication modes
    • MIME types
    • Directory Browsing
    • Output caching
    • Web binaries

And other related stuff and iis settings can be migrated using web deploy.

Go through https://www.iis.net/downloads/microsoft/web-deploy and download web deploy for your IIS.

Upvotes: 2

Jalpa Panchal
Jalpa Panchal

Reputation: 12854

To Backup and Restore IIS configuration to Another Server you could try below steps:

1)if you configured the certificate with old iis site you need to Backup (export) of IIS certificates.

2)open the command prompt as administrator and create IIS configuration backup on the first server by using below command:

cd c:\Windows\system32\inetsrv


appcmd add backup srviis1-backup-2019

srviis1-backup-2019 this is a backup folder name.

After the command has been executed, a folder with your backup name appears in c:\Windows\system32\inetsrv\backup. Here is its contents for my simple website:

  • administration.config
  • applicationHost.config
  • MBSchema.xml
  • MetaBase.xml
  • redirection.config

enter image description here

3)Copy the backup folder to the same directory c:\windows\system32\backup on another server.

To display the list of all available backups, run the following command:

appcmd list backup

enter image description here

4)Recover IIS configuration from this backup:

appcmd restore backup srviis1-backup-2019

The list of restrictions and important issues:

  • The same IIS version has to be used on both servers
  • If any application pool is run not from the integrated accounts, they have to be available on another server as well
  • Before recovery, you should export and migrate all current certificates to the new server

Upvotes: 16

Related Questions