Showing results for 
Search instead for 
Did you mean: 

Restoring all files using fsautility

Level 4


I am trying to restore all files for several shared folders which have been archived with EV. I have used the following command to restore all files for the EveryOne share: fsautility -t -s "\\bgo-file-01.domain.local\EveryOne" -d "\\bgo-p-vault-03\g$\EveryOne"

When it's done I have 86 630 files under \\bgo-p-vault-03\g$\EveryOne, but EV reporting says that it has 86 706 files archived from the EveryOne share. Looking at the xml report generated by fsautility, I can see that 42 files already existed (duplicates in EV), so I can deduct those. Still, I'm missing 34 files. How can I figure out which files are missing and why?



Level 5
Employee Accredited Certified


The 'already existed' message should indicate that the file was already in the destination folder when the restore was attempted.  Was the target folder empty when the restore began? EV should only attempt to restore the latest version of each archived file so it should not restore duplicates(versions) to the same location.   

The -f switch would have to be used to overwrite files that currently exist in the target location.  However, this can cause some data loss as the files located there may be newer than the ones in the archive so it should be used carefully.  Adding the -l 0 (zero) switch to the end of the command will log all failures and successes to the log file.  



Level 4

Hi, Thanks for replying.

The destination folders are empty when running the command. The xml files are filled with "Already queued" and "File exists" messages, but not enough to explain all the missing files.

Level 5
Employee Accredited Certified

Which report are you looking at for the information?  Also, what version of EV are you using? 


Level 4

I right-click on the Vault Store and choose Reporting. This brings up a Vault Store "File System Vault Store" detailed usage information table telling me the number of items in each archive. Then I compare this number with the number of restored files on the file system. Please let me know if there is a better way to verify if all files have been restored.

We use EV 8.0 SP5.

Level 5
Employee Accredited Certified

This would should you a Total number of items in the archive, including all versions of a file, as it is only a count of items within the archive and does not factor in the versions.  When FSAUtilty runs it will only restore the latest version of the file.  

In order to get a list of items it would be necessary to query SQL and do some comparison on the output.



Level 5
Employee Accredited Certified

You can run this query against the vault store and it will show you all files within that archive under FileName.  The ArchiveID will need to be replaced with that of the archive in question.  This can be found on the Advanced tab of the Properties page of the archive.  Once you have the output you can remove the duplicates in the FileName column to determine how many unique files there are in the archive.  

DECLARE @ArchiveName nvarchar(75)
DECLARE @ArchiveID nvarchar(75)
DECLARE @FolderID nvarchar(75)
DECLARE @Idtransaction nvarchar(40)

--Change ArchiveID below to value
SET @ArchiveID = '16249F038B3111642962A43B25043D24D1110000EV9'
SET @ArchiveName = NULL
SET @FolderID = NULL
SET @Idtransaction = Null

    R1.VaultEntryId as ArchiveID,
    FileName =  convert(nvarchar(max),FolderPath) + '\' + substring(properties, (charindex('<filename>', properties)+10), 
                                    (charindex('</filename>', properties)-(charindex('<filename>', properties)+10)))                        
EnterpriseVaultDirectory.dbo.root r1
    JOIN EnterpriseVaultDirectory.dbo.Root r2 on r1.RootIdentity = r2.ContainerRootIdentity
    JOIN EnterpriseVaultDirectory.dbo.archive on r1.RootIdentity = Archive.RootIdentity
    JOIN EnterpriseVaultDirectory.dbo.ArchiveFolder on r2.RootIdentity = ArchiveFolder.RootIdentity
    JOIN Vault on r2.VaultEntryId = Vault.Vaultid 
    JOIN Saveset ss on Vault.VaultIdentity = ss.VaultIdentity
    JOIN SavesetProperty sp on ss.savesetidentity = sp.SavesetIdentity
    LEFT JOIN Collection on ss.CollectionIdentity = Collection.CollectionIdentity 
    r1.VaultEntryid= ISNULL(@ArchiveID, r1.VaultEntryid)
    AND ArchiveName = ISNULL(@ArchiveName, ArchiveName)    
    AND r2.VaultEntryid = ISNULL(@FolderID, r2.VaultEntryId)   
    AND ss.IdTransaction = ISNULL(@Idtransaction, ss.IdTransaction)
    ArchivedDate DESC

Level 4

I deduct the number of "Already queued" and "File exists" messages in the xml file. Wouldn't that give me the total number of unique files? If I try to restore a share having multiple versions of a file, only one file is restored and the xml file logs either "Already queued" and "File exists".

Level 4

Thanks. I will test this now.