Adam,

I got the message below from another list member Kent.... hope it helps....

Thanks,

Pam Dean
Windows 2000 MCP

http://www.orcsweb.com/
Powerful Web Hosting Solutions
#1 in Service and Support
-----------------------------------------message for backing up
IIS------------------------------------

Use Scripting. We had a similar need to recover a corrupted server not
so long ago. Here's a primer. I prefer this approach because it persists
the information to a transformable format that doesn't depend on IIS's
metabase functioning.

' Create a DOM document instance to hold the information gathered.
Set objDOM = CreateObject("MSXML2.DOMDocument")

' Get the root web service on the target machine
Set objIIS = GetObject("IIS://localhost/W3SVC")

' Try to determine exactly how many service instances
' are running on the target machine.
intLastSite = 0
For Each objInst In objIIS
    If IsNumeric(objInst.Name) Then
        If CInt(intLastSite) < CInt(objInst.Name) Then
            intLastSite = CInt(objInst.Name)
        End If
    End If
Next

' Add an appropriate XML PI
Set objIIS = objDOM.createProcessingInstruction("xml",
"version=""1.0""")
objDOM.appendChild objIIS

' Add a document root element called websites and an attribute
' with the date the information was gathered. Yes, I know,
' the now function doesn't generate xsd:dateTime format.
Set objRoot = objDOM.createElement("websites")
Set objAtr = objDOM.createAttribute("generated")
objAtr.value = now
objRoot.Attributes.setNamedItem objAtr

' Interate through each of the sites (instance)
For index = 1 To intLastSite
    Set objSrv = GetObject("IIS://localhost/W3SVC/" & CStr(index))

    ' start an element for this site
    Set objElem = objDOM.createElement("website")

    ' Get the comment assuming that use you that as the site name
    ' Customer sites are prefixed with WEB
    commentname = objSrv.Get("ServerComment")
    If UCase(Left(commentname, 3)) = "WEB" Then

' Production sites have [PROD] following
' the site name, so strip that off
        commentname = Mid(commentname, 5, Len(commentname))
        FoundAt = InStr(commentname, "[") - 2
        commentname = Mid(commentname, 1, FoundAt)
        Set objAtr = objDOM.createAttribute("name")

' Since the contact name isn't in the metabase
' create a placeholder for it.
        objAtr.Value = commentname
        objElem.Attributes.setNamedItem objAtr
        Set objAtr = objDOM.createAttribute("contact")
        objAtr.Value = "Unknown"
        objElem.Attributes.setNamedItem objAtr

' Which service instance is this?
        Set objAtr = objDOM.createAttribute("instance")
        objAtr.Value = cstr(index)
        objElem.Attributes.setNamedItem objAtr

' Since the owner's name isn't in the metabase
' create a placeholder for it.
        Set objAtr = objDOM.createAttribute("owner")
        objAtr.Value = "Unknown"


' Add a subelement list with each of the addresses
' that the site is bound to listen to.
        objElem.Attributes.setNamedItem objAtr
        Set objAddresses = objDOM.createElement("addresses")
        strAddrA = objSrv.Get("ServerBindings")
        position = 0
For Each strAddr In strAddrA
            Set objAddress = objDOM.createElement("address")
            FoundAt = InStr(strAddr, ":")
            strIP = Left(strAddr, FoundAt - 1)
            Set objAtr = objDOM.createAttribute("ipaddress")
            objAtr.Value = strIP
            objAddress.Attributes.setNamedItem objAtr
            strAddr = Mid(strAddr, FoundAt + 1, Len(strAddr))
            FoundAt = InStr(strAddr, ":")
            strPort = Left(strAddr, FoundAt - 1)
            Set objAtr = objDOM.createAttribute("ipport")
            objAtr.Value = strPort
            objAddress.Attributes.setNamedItem objAtr
            strHHN = Mid(strAddr, FoundAt + 1, Len(strAddr))
            Set objAtr = objDOM.createAttribute("hostHeaderName")
            objAtr.Value = strHHN
            objAddress.Attributes.setNamedItem objAtr

            Set objAtr = objDOM.createAttribute("position")
            objAtr.Value = cstr(position)
            objAddress.Attributes.setNamedItem objAtr

            objAddresses.appendChild objAddress
            position = cint(position) + cint(1)
        Next

' Add the list of address to the current site
        objElem.appendChild objAddresses

' Add the current site to the list of sites
        objRoot.appendChild objElem
    End If
Next

' Add the list of sites to the document root
objDOM.appendChild objRoot

' Save the document to disk
objDOM.save ("siteinfo.xml")



Note, however, that IIS6 in .NET server will generate a similar XML file
via the MMC snap-in. Sweet.

Kent

-----Original Message-----
From: Pam Dean [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 04, 2002 5:32 PM
To: IIS50 Discussions
Subject: Backing up settings in IIS


I have been given a task to try and find out how to backup the settings
in
IIS on our servers in the event that a crash occurs.  Does anyone have
any
ideas about how to go about doing this? Or a direction to begin looking?

Thanks in advance for any assistance.

~Pam

---
You are currently subscribed to iis50 as: [EMAIL PROTECTED]
To unsubscribe send a blank email to
%%email.unsub%%

---------
Administrated by 15 Seconds : http://www.15Seconds.com
List Archives/Search : http://local.15Seconds.com/search
Subscription Information : http://www.15seconds.com/listserv.htm
Advertising Information: http://www.internet.com/mediakit/



---
You are currently subscribed to iis50 as: [EMAIL PROTECTED]
To unsubscribe send a blank email to %%email.unsub%%

---------
Administrated by 15 Seconds : http://www.15Seconds.com
List Archives/Search : http://local.15Seconds.com/search
Subscription Information : http://www.15seconds.com/listserv.htm
Advertising Information: http://www.internet.com/mediakit/


---
[This E-mail scanned for viruses by Declude Virus]



----- Original Message -----
From: "Adam Heavens" <[EMAIL PROTECTED]>
To: "IIS50 Discussions" <[EMAIL PROTECTED]>
Sent: Thursday, September 19, 2002 12:04 AM
Subject: Backing up IIS to move to another server


> Hi Everyone,
>
> Can any body provide any links on backing up iis and the web site files
> so that if necessary I can run a group of scripts and have exactly the
> same sites running on another server?
>
> Does anything like this exist?
>
> Thanks for your time, and any help you give me
>
> Regards
>
> Adam
>
>
>
> ---
> You are currently subscribed to iis50 as: [EMAIL PROTECTED]
> To unsubscribe send a blank email to
%%email.unsub%%
>
> ---------
> Administrated by 15 Seconds : http://www.15Seconds.com
> List Archives/Search : http://local.15Seconds.com/search
> Subscription Information : http://www.15seconds.com/listserv.htm
> Advertising Information: http://www.internet.com/mediakit/
>
>
> ---
> [This E-mail scanned for viruses by Declude Virus]
>
>

---
[This E-mail scanned for viruses by Declude Virus]


---
You are currently subscribed to iis50 as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]

---------
Administrated by 15 Seconds : http://www.15Seconds.com
List Archives/Search : http://local.15Seconds.com/search
Subscription Information : http://www.15seconds.com/listserv.htm
Advertising Information: http://www.internet.com/mediakit/


Reply via email to