Windows Tip Sheet
Disaster Recovery, or Just Disaster?
Simple IIS backup techniques
This was a trying week for me. I had no less than four customers who
had major disasters in their data centers and wound up having to restore
several servers. In two cases, the servers were running IIS 6.0 and acting
as intranet Web servers. The companies' administrators were good little
boys and girls and had dutifully backed up the servers each night, so
none of their Web content was lost. Unfortunately, they hadn't realized
that the IIS configurationthe actual Web site definitionsweren't
so easily backed up. One of them spent hours painstakingly re-creating
a dozen Web sites by hand. Given IIS' complex new architecture of application
pools and whatnot, I wouldn't be surprised if they're still finding configuration
errors a few days from now. After all, that's a lot of information to
re-create by hand.
So in memory of their hard work, I thought I'd offer some tips for fast
and easy IIS 6 backups.
Easiest IIS 6 Backup
The easiest IIS 6 backup trick is to export your Web site configurations
to an XML file. That way, you can recover any single Web site's configuration
without affecting any other Web sites that are running on the server.
This will not back up the site's content, but it will
back up the configuration the site usesits assigned IP address and
port, authentication settings, application pool assignment, and so forth.
Making the backup couldn't be easier: In the IIS console, simply right-click
a Web site and select "All Tasks," and then "Save configuration
to a file
" from the context menu. Provide a file name and you're
done. You can then grab that file with your normal backup scheme, along
with the Web sites' Web pages, graphics, and other files. This trick works
with FTP sites, too, so don't forget to back those up. And finally, you
can use this trick to back up all of your application pool configurations
to a single XML file. This nice, one-at-a-time backup is great to have
around if you accidentally mess up a site's configuration and don't remember
what it was supposed to be.
For more comprehensive backups that include everything IIS has to offer,
right-click the server name in the IIS console. You'll see two main options
on the context menu,"Backup/Restore Configuration" and "Save
configuration to disk
". The first option creates a sort of
internal backup that's stored on the system drive. In fact, if you check
it out, you'll see a number of automagically created backups. IIS makes
these whenever you make major configuration changes, so you've got a way
to quickly roll back those changes if necessary (kind of like System Restore
in Windows XP). You can manually create a new backup or restore a prior
backup anytime you like. By the way, the IIS docs refer to the automatic
backups as "history files."
The second option is to use the command-line Iisback tool. Interestingly,
this isn't an executable at all, but a VBScript (Iisback.vbs) that runs
under the CScript.exe command-line script host. Run Iisback
/? to see the command-line syntax, which is pretty straightforward;
Iisback /backup creates a complete backup.
The command-line tool is an easy way to use Task Scheduler to automate
periodic backups of the IIS metabase.
Have a bunch of AD computer accounts to create,
no time, and don't feel like creating a complex script?
Use Excel. Just set up a spreadsheet with the data,
export to a CSV file, and use AD's command-line import
utility to import the users and create the accounts.
Check out Help Online for details.
Tired of explaining to Windows Server 2003 why you're
shutting down the server? That "reason"
dialog is especially annoying in a lab, so check out
Microsoft KnowledgeBase 293814
to turn the thing off.
Advanced IIS 6 Training courseshttp://www.iisanswers.com
More IIS tips and trickshttp://www.iis-resources.com/
IIS performance optimization and administration resourceshttp://www.iisfaq.com/
A blog from one of IIS' Program Managers at Microsofthttp://blogs.gotdotnet.com/richarde/)
With more than fifteen years of IT experience, Don Jones is one of the world’s leading experts on the Microsoft business technology platform. He’s the author of more than 35 books, including Windows PowerShell: TFM, Windows Administrator’s Scripting Toolkit, VBScript WMI and ADSI Unleashed, PHP-Nuke Garage, Special Edition Using Commerce Server 2002, Definitive Guide to SQL Server Performance Optimization, and many more. Don is a top-rated and in-demand speaker and serves on the advisory board for TechMentor. He is an accomplished IT journalist with features and monthly columns in Microsoft TechNet Magazine, Redmond Magazine, and on Web sites such as TechTarget and MCPMag.com. Don is also a multiple-year recipient of Microsoft’s prestigious Most Valuable Professional (MVP) Award, and is the Editor-in-Chief for Realtime Publishers.