Saving/archiving IIS 7.5 settings for recovery etc

5,840

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:
5,840

Related videos on Youtube

Vector
Author by

Vector

Have been in IT/NYC financial industry etc. for about over 20 years. Started development work as a Paradox/Clipper/DBase guy around 1992. Done some serious work with Paradox, Delphi, SQLServer, C++, C#, XML-XSD and Python over the years, and have touched all phases of the SDLC. Right now getting up to speed with C++11, gtkmm3 and WT. History-Law-Math-Literary-Science Dilettante;

Updated on September 18, 2022

Comments

  • Vector
    Vector over 1 year

    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?

  • Vector
    Vector over 12 years
    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.
  • Ov's Pianist
    Ov's Pianist over 12 years
    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.
  • Ov's Pianist
    Ov's Pianist over 12 years
    ... 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?
  • Vector
    Vector over 12 years
    >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
    Vector over 12 years
    Tnx for all the help.