How to Backup and Restore the IIS Configuration?
- Create IIS backup on source server
- Move the backup to Destination server
- Create /check existing IIS backup at Destination server
- Restore the source server backup at destination server
- Check destination server IIS, All well Great, else restore latest IIS backup of Destination IIS server
Create IIS backup on source server
Open Command Prompt – CMD
Login as Administrator and Navigate to C:\Windows\System32\inetsrv Command Prompt on the source Server and run the following commnad to create a backup of Existing IIS configuration.
appcmd add backup ” “
for example
C:\Windows\System32\inetsrv>appcmd add backup "nov22020"
a Message will appear as BACKUP Object “nov22020” added
Move the backup to Destination server
In window explorer Navigate to C:\Windows\System32\inetsrv\backup folder and you will find the backup files stored in nov22020 folder. Zip this folder and copy to C:\Windows\System32\inetsrv\backup folder on destination server. Create Backup folder if doesn’t exist on Destination server.
Create /check existing IIS backup at Destination server
Visit C:\inetpub\history on Window Expolrer and see if IIS history is created. The restore can make the IIS miss configured and might not show any website. In this case we need to restore most recent IIS backup. If required you can create fresh backup of IIS configuration on destination server.
You can use following command to see the list of backups
Execute following command after logging as administrator and navigating to C:\Windows\System32\inetsrv to see the list of existing backups.
appcmd list backup
On the destination server open a command prompt as an Administrator and navigate to C:\Windows\System32\inetsrv and run the following command
appcmd list backup
“nov22020” should be listed
Restore the source server backup at destination server
The IIS configuration restore command is as follows:
appcmd restore backup "<backup Name>"
appcmd restore backup "nov22020"
You should received Restored configuration from backup “nov22020”
Open IIS GUI and see the restore websites and their configuration. If it doesn’t show anything restore the latest backup using following command.
appcmd restore backup "CFGHISTORY_0000000175"
Great article!
i was wondering if you can give me a hint about restoring inetsrv folder on a different server without using this backup method, reason is that I have an OS image that I can’t boot up but I use veeam backup application to copy inetsrv & inetpup and I want to use these folder on the new server