Reputation: 987
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
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
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
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:
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
4)Recover IIS configuration from this backup:
appcmd restore backup srviis1-backup-2019
The list of restrictions and important issues:
Upvotes: 16