DFSR: Deleted files

Discussion in 'File Systems' started by Alexander Szigetvary, Oct 19, 2006.

  1. Hi NG!

    2 servers: both Win 2003 R2
    When files are deleted on the primary the are being moved and renamed to the
    'ConfilctAndDeleted' subfolder on the second server. Is there a way or a
    tool that tells me what the original filename was and in which path it was
    stored? Which is the correct way to restore such a file? Restore it to the
    primary or secondary server? Is there a tool for that?

    TiA

    Alex
     
    Alexander Szigetvary, Oct 19, 2006
    #1
    1. Advertisements

  2. The conflict and deleted manifest contains the reference to the original
    filename and original path. It is located in
    DFSRPrivate\ConflictandDeletedManifest.xml. It doesn't matter which
    machine you restore the file to. there may be a VB script in an earlier
    post that can help you restore the file, it's not very robust when it comes
    to dir trees that have been deleted.

    Thanks,

    Robert A Post, Jr [MSFT]
    Distributed File Service Replication Test
    This posting is provided "AS IS" with no warranties, and confers no rights.
     
    Robert A Post, Jr, Oct 19, 2006
    #2
    1. Advertisements

  3. Alexander Szigetvary

    Geoff Walker Guest

    Dim ObjWb
    Dim ObjExcel
    Dim x, zz
    strComputer = "RemoteComputerFQDN"
    Set objWbemDFSR = GetObject("winmgmts:\\" & strComputer &
    "\root\MicrosoftDFS")
    Set colDFSRConflicts = objWbemDFSR.ExecQuery("SELECT * FROM
    DFSRConflictInfo")

    Call ExcelSetup("Sheet1") ' Sub to make Excel Document
    x = 1
    Call enummembers(objWbemDFSR)

    Sub enumMembers(objWbemDFSR)
    On Error Resume Next
    For Each objConflict In colDFSRConflicts ' go through the collection

    x = x +1 ' counter used to increment the cells in Excel

    objwb.Cells(x, 1).Value = objConflict.ConflictFileCount
    ' I set AD properties to variables so if needed you could do Null
    checks or add if/then's to this code
    ' this was done so the script could be modified easier.
    ConflictPath = objConflict.ConflictPath
    ConflictSizeInBytes = objConflict.ConflictSizeInBytes
    ConflictTime = objConflict.ConflictTime
    ConflictType = objConflict.ConflictType
    FileAttributes = objConflict.FileAttributes
    FileName = objConflict.FileName
    GVsn = objConflict.GVsn
    MemberGUID = objConflict.MemberGUID
    ReplicatedFolderGUID = objConflict.ReplicatedFolderGuid
    ReplicationGroupGUID = objConflict.ReplicationGroupGuid
    Uid = objConflict.Uid

    ' Write the values to Excel, using the X counter to increment the rows.

    objwb.Cells(x, 2).Value = ConflictPath
    objwb.Cells(x, 3).Value = ConflictSizeInBytes
    objwb.Cells(x, 4).Value = ConflictTime
    objwb.Cells(x, 5).Value = ConflictType
    objwb.Cells(x, 6).Value = FileAttributes
    objwb.Cells(x, 7).Value = Filename
    objwb.Cells(x, 8).Value = GVSN
    objwb.Cells(x, 9).Value = MemberGUID
    objwb.Cells(x, 10).Value = ReplicatedFolderGUID
    objwb.Cells(x, 11).Value = ReplicationGroupGUID
    objwb.Cells(x, 12).Value = UID

    ' Blank out Variables in case the next object doesn't have a value for the
    property
    ConflictFileCount = "-"
    ConflictPath = "-"
    ConflictSizeInBytes = "-"
    ConflictTime = "-"
    ConflictType = "-"
    FileAttributes = "-"
    Filename = "-"
    GVSN = "-"
    MemberGUID = "-"
    ReplicatedFolderGUID = "-"
    ReplicationGroupGUID = "-"
    UID = "-"
    Next
    End Sub
    Sub ExcelSetup(shtName) ' This sub creates an Excel worksheet and adds
    Column heads to the 1st row
    Set objExcel = CreateObject("Excel.Application")
    Set objwb = objExcel.Workbooks.Add
    Set objwb = objExcel.ActiveWorkbook.Worksheets(shtName)
    Objwb.Name = "DFSR Conflict" ' name the sheet
    objwb.Activate
    objExcel.Visible = True
    objwb.Cells(1, 2).Value = "ConflictFileCount"
    objwb.Cells(1, 3).Value = "ConflictPath"
    objwb.Cells(1, 4).Value = "ConflictSizeInBytes"
    objwb.Cells(1, 5).Value = "ConflictTime"
    objwb.Cells(1, 6).Value = "ConflictType"
    objwb.Cells(1, 7).Value = "FileAttributes"
    objwb.Cells(1, 8).Value = "FileName"
    objwb.Cells(1, 9).Value = "GVsn"
    objwb.Cells(1, 10).Value = "MemberGuid"
    objwb.Cells(1, 11).Value = "ReplicatedFolderGUID"
    objwb.Cells(1, 12).Value = "ReplicationGroupGUID"
    objwb.Cells(1, 13).Value = "Uid"
    End Sub
    MsgBox "Done" ' show that script is complete
     
    Geoff Walker, Dec 18, 2006
    #3
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.