We've started to update our 5 year old web server installation to a brand spanking new machine. We've been moving stuff before but this only ever involved moving whole system images to new hardware. This time around we are starting from scratch and also update the system to Windows 2008 64-bit edition. I'm documenting the issues we're having including the solutions we found to get around issues here.

The first things we realized was that the old way of using the IIS administration scripts won't work anymore, simply for the reason that Microsoft doesn't include them in IIS7 anymore. So no more

iiscnfg.vbs /export /f c:\backupiis.xml /sp / /children /inherited

We were acutally using above in a script that was run before a backup process started and thus we always had a nice way to restore IIS configurations in case something went wrong.

After some investigations I found that nowadays we're supposed to use AppCMD.exe instead. All good and fine BUT this doesn't seem to create a nice backup file that we can just store away. Or does it? A bit of snooping around later, fortunately for us, it turned out that this backup is just a simple file copy into a Backup sub folder of the %system%/inetsrv folder. Great.

A few minutes later we had our beforebackup.cmd script updated to include the following:

echo Backing up IIS settings
cd \
rd /Q /s c:\backupdata\iisback
c:\windows\system32\inetsrv\appcmd delete backup iisback
c:\windows\system32\inetsrv\appcmd add backup iisback
xcopy /s c:\windows\sysnative\inetsrv\backup\iisback\*.* c:\backupdata\iisback\

IIS configuration backup? SORTED!

Home | Community | Blogs | Hannes' Blog