EnumBackups

IIsComputer 개체의 EnumBackups 메서드를 사용하여 하나 이상의 백업 위치에 저장된 메타베이스 백업의 위치, 버전 번호, 각 백업 날짜 등을 검색하여 열거할 수 있습니다.

구문

IIsComputer.EnumBackups BkupLocIn, IndexIn, BkupVerOut, BkupLocOut, BkupDateTimeOut

매개 변수

BkupLocIn
100자까지 백업 위치를 지정할 수 있는 문자열입니다. 빈 문자열을 지정하면 모든 백업 위치가 검색됩니다.
IndexIn
열거할 백업의 색인을 지정합니다. 색인은 0부터 시작하여 MD_ERROR_DATA_NOT_FOUND가 반환될 때까지 1씩 증가합니다.
BkupVerOut
열거된 백업의 버전 번호입니다.
BkupLocOut
열거된 백업의 백업 위치입니다.
BkupDateTimeOut
UTC(Universal Time Coordinate) 형식으로 된 백업 날짜 및 시간입니다. 전에는 GMT(Greenwich Mean Time) 형식이었습니다.

코드 예

<%@ 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 
%> 
 

관련 항목

Backup, DeleteBackup, Restore


© 1997-2001 Microsoft Corporation. All rights reserved.