2

I'm looking for a backup strategy for a Windows 2008 Webserver.

What folders/files need to be backed up to easily restore all IIS 7 settings?

3

In order to backup IIS configuration data, you can use the command line utility AppCmd.exe. For example, to backup configuration, run the follow command:

%windir%\system32\inetsrv\appcmd.exe add backup "Backup Name"

This command creates a directory under %windir%\system32\inetsrv\backup. It copies the current configuration files into the backup directory, including applicationHost.config (IIS global configuration), administration.config (Admin Tool's configuration), metabase.xml and mbschema.xml.

Of course, you'll have to transfer these files to a secure place (tape, backup-to-disk, ...) and you'll have to backup the content of your web sites: html, script-files (asp, aspx, ...), images etc.).

Restoring a backup is very simple too. List the backups this way:

%windir%\system32\inetsrv\appcmd.exe list backups

and restore it using this command:

%windir%\system32\inetsrv\appcmd.exe restore backup "Backup Name"

There is a UI for IIS 7 Manager you can download here.


By the way: IIS 7 has a feature called "IIS 7.0 Configuration History".

4
  • The downside is, that appcmd.exe creates the backup in %windir%\system32\inetsrv\backup\. Do you backup this folder after doing appcmd.exe add backup? – Louis Haußknecht May 18 '09 at 12:16
  • Keep in mind that splattne's answer covers IIS config only. If you want to back up the sites, any DLLs or applications, you still need to back those up yourself. No one else can say where your web sites live - you're responsible for that one on your own. ;-) – Brent Ozar May 18 '09 at 12:16
  • Louis - right, exactly, you have to back that up. Good catch. – Brent Ozar May 18 '09 at 12:16
  • I was busy updating my answer while you were commenting. Can't type that fast. ;-) – splattne May 18 '09 at 12:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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