Forum Discussion

kleetuss14's avatar
kleetuss14
Level 3
8 years ago

FSA - query to count files in an archive

Hello Everyone,

I have an old EV9.0.2 (I know, I know...super old) environment that I'm trying to restore ALL of the files back to a Windows Server.  Just want to get the data out of EV.

I noticed that if I look at the Vault Store Usage report OR perform a search of an archive the 'total' number of files does not match what is being restored from FSAUtility.

For example if I search a target archive "USERS" with EV Search and use * the total results is 120,890 however after using FSAUtility to restore the archive I end up with only 105,019 files. The command runs with no major errors and not 15,000 errors for sure) Is this difference due to file versioning within the archive? Meaning is there possibly several versions of a given file and FSAUtility only restores 1 version of the file.

Is it possible to query the EV VS DB and get an accurate count of the items that would be restored? My goal is to prove that 'a version' of every single file was restored from the archive...I don't care about the other versions (i.e. older revs, etc) of these files just want to be sure that each unique file was restored.

many thanks in advance.

JOE

  • Hi,

    There are 89 entries that will have to be added since each is a separate archive. I will go through one example from the data that was received.  

    Use the following to add the volume to archive reference.  Only the second number will change as the volume is the same(F$).  This is example for entry 1 in the csv file.  

    INSERT INTO [EnterpriseVaultDirectory].[dbo].[FileServerVolumeArchiveEntry]

               ([VolumeEntryId]

               ,[ArchiveVEID])

         VALUES

               ('1A0F39F88C54253459E178FA0082C5CE51011000EVARCHIVE'

               ,'182BC02E515AA5F47833A4F1211F5D5F11110000EVARCHIVE')

    GO

     

    Once the above is run you should be able to run FSAUtility using the following format:

     

    FSAUtility -t -s  "\\sint02.SAFETYINSURANCENET.COM\F$\user\Clmccormac" -d "\\sint06.safetyinsurancenet.com\F$\user"

    The -d path can be any location and does not need to be an FSA target.  This should restore all of the data from that archive to the destination path as -t is always recursive.  If files exist with the same name in the path they will not be overwritten unless the -f switch is used.  However, using this could cause partial data loss if the item has been updated, but not re-archived, since the archived copy would be older and replace the updated file.  

     

    Then repeat the process for each of the other archives modifying the INSERT to update the second value for ArchiveVEID.  

     

    After all is complete you can remove the source volume and target.  You can also delete the archives for each of the ones that was restored to clear up storage space.  

     

    Regards,

    Patrick 

    • plaudone1's avatar
      plaudone1
      Level 6

      Hi,

      The FSA file versions would typically be the reason for this as FSAUtility will only restore the latest version of the file.  Each version will have its own entry in the SaveSet table so a count of that alone will not be correct.  The versions are not tracked with a "version" column, but by path, name, and modified date.  

      You could use the attached query to show the files within the archive and then export to Excel.  You should then be able to filter by the folderpath and name to get all the unique files within the archive.  

      This query works for all versions of EV, however post EV 11 the Properties value in the SavesetProperty table was modified to reduce the size.  It no longer uses XML format which reduced the entry by about 75% on average.  The case lines have been commented out for 11.x or higher.  

      Regards,

      Patrick 

       

      • kleetuss14's avatar
        kleetuss14
        Level 3

        I used the query you provided and exported all of the rows out to investigate.

        After restoring each of the (3) folder targets I have 1,349,929 files.

        The query results in a total files of 1,535,689.

        The results from the query also show an old server target that was migrated off of some time ago.  The current Prod Server is SINT06.  Query results showing additional files under SINT02. These files (~92k) appear to have NOT been restored.  SINT02 is no longer configured within EV Admin Console.

        Thoughts on how I can restore these from the archive?