126 lines
4.4 KiB
HTML
126 lines
4.4 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
|
<HTML>
|
|
<HEAD>
|
|
<META HTTP-EQUIV="Content-Type" Content="text/html; charset=Windows-1252">
|
|
<TITLE>EnumBackups</TITLE>
|
|
<SCRIPT LANGUAGE="JavaScript">
|
|
<!--
|
|
TempString = navigator.appVersion
|
|
if (navigator.appName == "Microsoft Internet Explorer"){
|
|
// Check to see if browser is Microsoft
|
|
if (TempString.indexOf ("4.") >= 0){
|
|
// Check to see if it is IE 4
|
|
document.writeln('<link rel="stylesheet" type="text/css" href="/iishelp/common/coua.css">');
|
|
}
|
|
else {
|
|
document.writeln('<link rel="stylesheet" type="text/css" href="/iishelp/common/cocss.css">');
|
|
}
|
|
}
|
|
else if (navigator.appName == "Netscape") {
|
|
// Check to see if browser is Netscape
|
|
document.writeln('<link rel="stylesheet" type="text/css" href="/iishelp/common/coua.css">');
|
|
}
|
|
else
|
|
document.writeln('<link rel="stylesheet" type="text/css" href="/iishelp/common/cocss.css">');
|
|
//-->
|
|
</script>
|
|
<SCRIPT LANGUAGE="VBScript">
|
|
<!--
|
|
Sub Window_OnLoad()
|
|
Dim frmContents
|
|
On Error Resume Next
|
|
If Not Parent Is Nothing Then
|
|
Set frmContents = Parent.Contents
|
|
If Not frmContents Is Nothing Then
|
|
frmContents.Window.TOCSynch_Click
|
|
End If
|
|
End If
|
|
End Sub
|
|
//--></SCRIPT><META NAME="DESCRIPTION" CONTENT="Internet Information Services reference information">
|
|
<META HTTP-EQUIV="PICS-Label" CONTENT='(PICS-1.1 "<http://www.rsac.org/ratingsv01.html>" l comment "RSACi North America Server" by "inet@microsoft.com <mailto:inet@microsoft.com>" r (n 0 s 0 v 0 l 0))'>
|
|
<META NAME="MS.LOCALE" CONTENT="EN-US">
|
|
<META NAME="MS-IT-LOC" Content="Internet Information Services">
|
|
</HEAD>
|
|
|
|
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
|
|
|
|
<H3><A NAME="_k2_enumbackups"></A><SUP></SUP>EnumBackups</H3>
|
|
|
|
<P>You can use the <B>EnumBackups</B> method of the <A HREF="/iishelp/iis/htm/asp/aore2xpu.htm"><B>IIsComputer</B></A> object to enumerate metabase backups stored in one or more backup locations, retrieving the location, version number, and date of each backup.</P>
|
|
|
|
<H6>Syntax</H6>
|
|
|
|
<P><B>IIsComputer</B>.<B>EnumBackups</B> <I>BkupLocIn</I>, <I>IndexIn</I>, <I>BkupVerOut</I>, <I>BkupLocOut</I>, <I>BkupDateTimeOut</I> </P>
|
|
|
|
<P> </P>
|
|
|
|
<H6>Parameters</H6>
|
|
|
|
<DL>
|
|
<DT><I>BkupLocIn</I></DT>
|
|
|
|
<DD>A string of up to 100 characters that specifies the backup location. If an empty string is specified, all backup locations will be searched.<BR>
|
|
</DD>
|
|
|
|
<DT><I>IndexIn</I></DT>
|
|
|
|
<DD>Specifies the index of the backup to enumerate. Start the index at 0 and increment by 1 until <B>MD_ERROR_DATA_NOT_FOUND</B> is returned.<BR>
|
|
</DD>
|
|
|
|
<DT><I>BkupVerOut</I></DT>
|
|
|
|
<DD>Receives the version number of the backup enumerated.<BR>
|
|
</DD>
|
|
|
|
<DT><I>BkupLocOut</I></DT>
|
|
|
|
<DD>Receives the backup location of the backup enumerated.<BR>
|
|
</DD>
|
|
|
|
<DT><I>BkupDateTimeOut</I></DT>
|
|
|
|
<DD>Receives the date and time of the backup, in Universal Time Coordinate (UTC), formerly GMT (Greenwich Mean Time).</DD>
|
|
</DL>
|
|
|
|
<H6>Code Example</H6>
|
|
|
|
<PRE><CODE><%@ LANGUAGE=VBScript %>
|
|
<SCRIPT LANGUAGE = "JScript" RUNAT = SERVER>
|
|
var TempDate = new Date();
|
|
TempDif = TempDate.getTimezoneOffset();
|
|
Session("sTempDif") = TempDif;
|
|
</SCRIPT>
|
|
<%
|
|
Dim CompObj, Index, Version, Location, GMTDate, LocDate, MinDif
|
|
MinDif = Session("sTempDif")
|
|
On Error Resume Next
|
|
Set CompObj = GetObject("IIS://LocalHost")
|
|
Index = 0
|
|
' Iterate until method returns an error.
|
|
Do While True
|
|
' Empty location input string means enumerate all locations.
|
|
CompObj.EnumBackups "", Index, Version, Location, GMTDate
|
|
If Err.Number <> 0 Then
|
|
' If error returned, no more backups to enumerate.
|
|
Exit Do
|
|
End If
|
|
Response.Write Version & ", "
|
|
Response.Write Location & ", "
|
|
Response.Write GMTDate & ", "
|
|
' Convert to server local date and time.
|
|
LocDate = DateAdd("n", (-MinDif), GMTDate)
|
|
Response.Write "(" & LocDate & ")"
|
|
Response.Write "<BR>"
|
|
Index = Index + 1
|
|
Loop
|
|
%>
|
|
</CODE></PRE>
|
|
|
|
<H6>See Also</H6>
|
|
|
|
<P><A HREF="/iishelp/iis/htm/asp/aore32cw.htm"><B>Backup</B></A>, <A HREF="/iishelp/iis/htm/asp/aore79rk.htm"><B>DeleteBackup</B></A>, <A HREF="/iishelp/iis/htm/asp/aore5ucl.htm"><B>Restore</B></A></P>
|
|
<hr class="iis" size="1">
|
|
<p align="center"><em><a href="../../../common/colegal.htm">© 1997-2001 Microsoft Corporation. All rights reserved.</a></em></p>
|
|
</BODY>
|
|
</HTML>
|