Skip to content

How to Back Up and Restore IIS Configuration with AppCmd Print

  • 0

How to Back Up and Restore IIS Configuration with AppCmd

Applies to: Windows Server 2019, 2022 and 2025.

IIS configuration backup captures applicationHost.config and related server settings, not website content, certificates, databases or every external dependency.

Web-server changes can expose data or interrupt production traffic. Use backups, least privilege and a staged validation path. Visit networkmanager.info for managed Windows VPS services.

Prerequisites

  • Use elevated Command Prompt.
  • Back up content and certificates separately.
  • Choose a descriptive backup name.
  • Test restore in a non-production environment.

Procedure

Step 1: Create IIS backup

Use AppCmd from inetsrv.

%windir%\system32\inetsrv\appcmd add backup BeforePortalChange

Step 2: List backups

Confirm timestamp and name.

%windir%\system32\inetsrv\appcmd list backup

Step 3: Export supporting inventory

Capture sites, pools and bindings.

%windir%\system32\inetsrv\appcmd list site
%windir%\system32\inetsrv\appcmd list apppool

Step 4: Make the approved change

Keep content and certificate backup available.

Step 5: Restore when required

Restore the named configuration backup.

%windir%\system32\inetsrv\appcmd restore backup BeforePortalChange

Verification

After restore, inspect sites, pools, bindings and application response.

%windir%\system32\inetsrv\appcmd list site
%windir%\system32\inetsrv\appcmd list apppool

Rollback

The restore command is itself rollback. If it fails, recover configuration, content and certificates from the broader system backup.

Security notes

Protect backups because configuration can contain paths, identities and connection information.

Official references

Explore Netcloud24 Canada.


Was this answer helpful?

« Back