次の方法で共有


Create an IIS configuration backup

This article has been moved to its new home here:  https://benperk.github.io/msdn/2011/2011-08-create-an-iis-configuration-backup.html

The first step to take when making changes to a system is to backup what you currently have so that if there are problems with the system after the changes have applied, you have time constraints and can’t get the system to work, then you have at least a backup of the systems state to reapply if required.

I don’t generally like to rollback, none of us do, simply because of all the effort, planning and sacrifices required to get to the point where a release is possible.  Nonetheless, always have a back-out plan…always.

To backup the IIS configuration using IIS 7+ machine perform the following.

Start a Command Prompt as an Administrator by right-clicking the icon and selecting Run As Administrator. Navigate to the windows working directory and then to the systems32\inetsrv and run the following command.

appcmd add backup cleaninstall

You should receive the below result:

To rollback to the backed up configuration start a Command Prompt as an Administrator by richt-clicking the icon and selecting Run As Administrator.  Navigate to the windows working directory and then to the system32\inetsrv directory and run the following command.

appcmd restore backup cleaninstall

You should receive the below result:

After the restore, IIS will be in the state it was when the backup was originally taken.