2

We want to make sure that the script below will capture all needed configuration settings to restore on a new machine IIS and all Security Settings.

'This script will dump a daily system state backup to the directory
' c:\sysstatebkup\ on every Intensive Server

Dim shell, network, fso

Set shell = CreateObject("WScript.Shell")
Set network = CreateObject("WScript.Network")
Set fso = CreateObject("Scripting.FileSystemObject")

Dim strBackup

strBackup = "ntbackup backup systemstate /j ""Daily System State Backup"" /f ""C:\SysBkUp\SystemState.bkf"" /v:yes /l:f"

shell.Run strBackup

NOTE 1: Thanks Evan for your comments, I will give a little more information due to his answer. What we are trying to accomplish is: We want to have a very good and easy to restore backup of IIS and all the applications running there. We have the application content but the actual configuration of IIS is missing. I will list below the things we need to backup and how we have done it, since this question is only part of the total solution:

  1. IIS Application Content (backing up, we are wondering how to capture security settings of some directories?)
  2. IIS Configuration
  3. MSSQL Databases & Security settings to connect to each database

4 Answers 4

2

You're taking a System State backup only. That will contain the registry (including COM+ registrations), and Active Directory and the SYSVOL (though I doubt it's installed on your web servers), Certificate Services database (which probably also isn't installed on your web servers), and the IIS Metabase.

I can't say what you mean, specifically, when you talk about restoring "Security Settings". You won't be able to restore, for example, NTFS ACLs on files that you're not backing-up (i.e. the web site content-- or, really, anything outside the System State). For your application you're going to be able to get back the IIS Metabase and registry. If that contains everything you describe as "Security Settings" then you're in good shape.

You really don't need a VBScript to call that command. You can call that directly from Scheduled Tasks since you're not using the VBScript to any kind of variable substitutions in the backup command line, etc.

BTW, your comment about the backup destination directory and the NTBackup command lines differ.

3
  • Thanks Evan. I gave a little more information after your comments. Thanks.
    – Geo
    Jul 28, 2009 at 20:22
  • Evan: Congratulations for becoming Serverfault's Superuser!
    – splattne
    Jul 29, 2009 at 6:42
  • @Splattne: Thanks! We'll see if I can maintain it... heh heh. (It sure is fun, regardless...) Jul 29, 2009 at 10:41
1

I would backup/copy the Systemstate file to an external device (e.g. a network share on another server). If something bad happens to the C: partition the file will be in a secure place.

A tip: take your time and try to restore all data and configuration to a new (or staging) server. In my experience there are always particular things you won't see until you try to restore a real backup and test all services.

1
  • Agreed. Nothing ever goes as planned without actually 'going' a few times to work out all the kinks.
    – osij2is
    Jul 28, 2009 at 20:49
0

I would just backup everything on the server. Weekly full and daily differential if you've got data or settings changing on it. It's cleaner, easier, and you can be absolutely certain that you haven't missed anything.

0

A back up will be spefic to the server name and machine.. So if your moving from one host to another..

copy the metabase information,

IIS 6.0 replaces the single binary file (MetaBase.bin) of earlier IIS versions with two XML files: MetaBase.xml and MBSchema.xml. IIS stores these files in the systemroot\System32\Inetsrv folder of your computer. To view and modify these files, you must be a member of the Administrators group.

The metabase consists of the following elements:

• MetaBase.xml file. This file stores IIS configuration information that is specific to an installation of IIS.

• MBSchema.xml file. This file contains the metabase schema. The MBSchema.xmlfileis a master configuration file that defines default attributes for all metabase properties and enforces rules for constructing and placing metabase entries within the metabase.

• In-memory metabase. The in-memory metabase contains the most current metabase and metabase schema configuration. The in-memory metabase accepts changes to the metabase configuration and schema, storing them in RAM, and periodically writing changes to the on-disk metabase and metabase schema files.

When IIS starts, the MetaBase.xml and MBSchema.xml files are read by the IIS storage layer and copied to the in-memory metabase. While IIS is running, any changes that you make to the in-memory metabase are periodically written to disk. IIS also saves the in-memory metabase to disk when you stop IIS.

For the file security you can script, remember to use local groups and add global groups for authorisation.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .