Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am not an trained sysAdmin or network engineer, just a programmer who has picked up some knowledge over the years, and at the moment I find myself managing an IIS 7.5 deployment on WinServer 2008 R2.

I need to know if there is a fairly painless way to save my entire IIS 7.5 configuration - including app pools and their settings, security params, etc. for backup/recovery etc.

I know there are a few config files that persist IIS settings - is it enough to archive them somewhere and load them if I need to restore my configuration?

If so, which files are needed for this? Where are they located? What else might need to be done so that I can always restore my production IIS settings when necessary?

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

Sure! From %windir%\system32\inetsrv , run

APPCMD ADD BACKUP MyBackup

(and APPCMD RESTORE BACKUP MyBackup if/when in trouble)

... which should do the job for you. It backs up your applicationhost.config file (and a couple of related configuration files), which is your central IIS configuration store.

Websites and apps also store settings in Web.config files within their directories, so you'll need to back these up with the website/content as well, but the sites, applications and other server-level settings are all stored in that applicationhost.config file.

The backups live in c:\inetpub\history by default, and the App Host Helper service (AppHostSvc) backs up a History copy every 2 minutes, if changes have been detected, to a max of 10 backups by default (configurable via Configuration Editor - open configHistory at the server level).

share|improve this answer
    
Will give it a shot - thanks. Questions: 1- does MyBackup need to be with a specific extension? 2 - If I put a copy of MyBackup.* somewhere offsite, etc, will it restore everything if I lose the current server entirely (it's a VM) and have to start again from scratch? Tnx. –  Vector Sep 14 '11 at 13:28
1  
1 - it's essentially a folder name you're supplying - try it, and have a look at what gets written to the History folder. 2 - it'll restore the IIS configuration, but nothing else - none of the content or anything outside the IIS configuration. If you want a complete system backup - not just IIS settings, but system and content files, user profiles, registry, everything - use the Backup utility to take one. –  TristanK Sep 14 '11 at 13:36
1  
... and if you assume it's going to be restored to a different/replacement fresh-built server, if you install the same IIS components on the new server, the configuration (from this backup) and content should restore cleanly, unless encrypted properties (passwords) are stored in the configuration, in which case you'll also need to export/import the configuration encryption keys as well. And configure everything else equivalently outside IIS (specific IPs if you're using specific IPs, COM apps, etc). It sounds more like you'd be better off taking a snapshot of the VM and rolling back to it? –  TristanK Sep 14 '11 at 13:48
    
>It sounds more like you'd be better off taking a snapshot of the VM >and rolling back to it? You're right about that, but that aspect is out of my domain. But I should be good as long as I have the appPools, handlers and security/access rights easily restorable. It's an internal app and everything runs with anonymous access using the identity of a designated domain account and the app is just one DLL that is in source control etc, so even if VM is trashed, it shouldn't bother me much if I have the IIS config backed up. Thanks again. Wish I could give you some more points... –  Vector Sep 14 '11 at 15:05
1  
If it's a simple app, the config backup plus content backup will probably be enough. Good luck! –  TristanK Sep 14 '11 at 22:22
show 1 more comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.