Windows OS Hub
  • Windows Server
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2012
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Group Policies
  • Windows Clients
    • Windows 10
    • Windows 8
    • Windows 7
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
  • PowerShell
  • Exchange
  • Home
  • About

Windows OS Hub

  • Windows Server
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2012
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Group Policies
  • Windows Clients
    • Windows 10
    • Windows 8
    • Windows 7
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
  • PowerShell
  • Exchange

 Windows OS Hub / Windows Server 2012 R2 / How To Backup and Restore IIS configuration to Another Server

November 11, 2016 Windows Server 2012 R2

How To Backup and Restore IIS configuration to Another Server

This article describes how to create the backup of IIS Web site, application pool and configuraion and restore them on another server. This guide will help you to create your own plan of emergency recovery for IIS-based websites, migrate the configuration and websites between the servers or add a new server to the web farm.

Backup of website data and configuration running on the Internet Information Service web server consists of several steps:

  1. Backup of website files (by default, they are stored in %SystemDrive%\inetpub\wwwroot). This directory must be included to the backup plan to create its copy using backup tools or your own scripts
  2. Backup (export) of current IIS certificates (you can get the list of SSL certificates on the server using this command: netsh http show sslcert)
  3. Backup of IIS configuration (settings)

We’ll show how to create a backup of IIS configuration on one server and restore it on another one.

Using appcmd, create IIS configuration backup on first server. To do it, run the command prompt with the administrator privileges and go to the following directory:

cd c:\Windows\system32\inetsrv

Create the IIS configuration backup with name srviis1-backup-20161107:
appcmd add backup srviis1-backup-20161107

appcmd - backup iis site config

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

iis config files

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

As we can see, the backup we have copied has appeared in the list of available backups.

Recover IIS configuration from this backup:
appcmd restore backup srviis1-backup-20161107

appcmd restore iis from backup

The string Restored configuration from backup “srviis1-backup-20161107″  means that IIS configuration has been successfully recovered.

Note. There are entries like BACKUP “CFGHISTORY_0000000001” in the list of available backups. These are IIS configuration backups created automatically and located in \inetpub\history. Automatic backup has appeared in IIS since IIS 7: the changes in ApplicationHost.config are being monitored, 10 latest backups are stored and the file is checked for changes every 2 minutes.

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

 

1 comment
3
Facebook Twitter Google + Pinterest
previous post
How to Upgrade VM Hardware Version in VMWare ESXi
next post
Disable Creating Thumbs.db on Network Folders

Related Reading

How to Backup Hyper-V Virtual Machines?

December 10, 2019

How to Measure Storage Performance and IOPS on...

October 30, 2019

Installing SFTP (SSH FTP) Server on Windows with...

October 2, 2019

How to Approve and Decline WSUS Updates?

September 26, 2019

How to Disable NTLM Authentication in Windows Domain?

September 24, 2019

1 comment

Scott Turner February 20, 2017 - 9:26 pm

Thank you for writing this. Depending on user needs for ongoing IIS and SQL Server configuration remediation, rollback, backup and recovery, a commercial solution like Orcaconfig may make sense.

Orca takes configuration inventory snapshots (every few minutes or so) and stores the current configurations of the Production environment. In a recovery or disaster scenario where you lose access to Production and need to fail over to DR, your Production configuration settings already stored automatically.

Reply

Leave a Comment Cancel Reply

Categories

  • Active Directory
  • Group Policies
  • Exchange
  • Windows 10
  • Windows 8
  • Windows 7
  • Windows Server 2016
  • Windows Server 2012 R2
  • Windows Server 2008 R2
  • PowerShell
  • VMWare
  • MS Office

Follow us

woshub.com

Recent Posts

  • The Disk is Offline Because of Policy Set by an Administrator

    December 12, 2019
  • How to Backup Hyper-V Virtual Machines?

    December 10, 2019
  • How to Change a Network Location from Public to Private on Windows 10/Windows Server 2016?

    December 9, 2019
  • Configuring Storage Replica on Windows Server 2016

    December 4, 2019
  • Windows 10 Install Error 0x80300024

    December 2, 2019
  • Running PowerShell Script (*.PS1) as a Windows Service

    November 27, 2019
  • Creating Multiple Partitions on a USB Drive in Windows 10

    November 26, 2019
  • VMWare vSphere: Failed to Upload Files to Datastore

    November 21, 2019
  • How to Delete Old User Profiles Using GPO and PowerShell?

    November 19, 2019
  • Get-ADUser: Getting Active Directory Users Info via Powershell

    November 18, 2019
  • Facebook
  • Twitter
  • RSS
Popular Posts
  • Granting Remote Access on SCManager to Non-admin Users
  • Schedule Task to Start When Another Task Finishes
  • The Remote Desktop Session Host Server Does Not Have a Remote Desktop License Server Specified
  • Fix: Server Stuck on “Preparing to Configure Windows”
  • Printer Pooling: How to Configure a Printer Pool in Windows Server 2012 R2
  • How to Run File Explorer Elevated
  • Windows.edb File Too Big – How to Reduce Size
Footer Logo

@2014 - 2018 - Windows OS Hub. All about operating systems for sysadmins


Back To Top