Quick Tip: How to Backup and Restore IIS Using appcmd.exe

If you’re managing a Windows Server running IIS, it’s always a good idea to back up your configuration before making major changes. Here’s a quick and effective way to do that using the built-in appcmd.exe tool.

🛡️ Backup IIS Configuration

Open Command Prompt as Administrator and run:

cd C:\Windows\System32\inetsrv
.\appcmd.exe add backup local-iis-backup-2024_10_23

This will create a backup named local-iis-backup-2024_10_23 in:

C:\Windows\System32\inetsrv\backup

You can manually copy this backup folder to a safe location for future use or to archive multiple versions.

♻️ Restore IIS Configuration

To restore a previous backup, first list all available backups:

cd C:\Windows\System32\inetsrv
.\appcmd.exe list backup

Then restore the desired one (make sure to stop the IIS services if needed):

.\appcmd.exe restore backup /stop:true local-iis-backup-2024_10_23

✅ Notes

  • Always verify your restored config by checking that your sites and app pools are running as expected.
  • You can schedule these backups using Task Scheduler or a script to automate periodic snapshots.
Scroll to Top