The indexes are key to the journal system, without indexes there is no way to do any searches, therefore their is a need to validate the indexes.
The risks we need to address is that there is no major index corruption, to accomplish this there is a tool called Enterprise Vault Index Check to validate the indexes.
The following script will be used to automate this process:
:: Enterprise Vault Index Check Tool (EVICT)
:: This is a simple script to validate all Indices
:: v0.9 Initial Version
:: Set Variables set IndexFolder=D:\EVStorage\Index\
:: Set the output verbosity - 0 (no output), 1 (errors only), 2 (information), and 3 (verbose).
:: Check to see where Enterprise Vault has been installed
for /F "tokens=3*" %%i in ('REG QUERY "HKLM\SOFTWARE\KVS\Enterprise Vault\Install" /v InstallPath ^| find "REG_SZ"') DO SET EVInstallPath=%%i %%j
:: Append the Enterprise Vault directory to %path%
::for /F "tokens=3*" %%i in ('REG QUERY "HKLM\SOFTWARE\KVS\Enterprise Vault\Directory\DirectoryService" /v "SQLServer Name" ^| find "REG_SZ"') DO SET SQLServer=%%i %%j
ECHO Enterprise Vault Index Check Tool v1.01 - evdiscuss.net
ECHO EVICT : Output Verbosity set to %Verbosity%
ECHO EVICT : LogFile - %LogFile%
ECHO EVICT : CSVFile - %CSVFile%
ECHO EVICT : Checking Indices in %IndexFolder%
:: Run IndexCheck with relevant parameters
IndexCheck.exe -f %IndexFolder% -v %Verbosity% -csv %CSVFile% -ignorewarnings > %LogFile%
The script must be run on the folder level.
The script must be configured to point at the correct folder level, see highlighted section.
The script needs to run on all the Enterprise Vault Servers.
The script will run daily and will check all indexes younger than two days.
The script is an additional check to the Standard built in Enterprise Vault Checks.
Since an index folder is specified, rather than a particular index, this means that all the indexes within that index location will be checked. Typically this check takes about 2 to 3 seconds per index and since it is simply a file level check, it does not open the index and search it in any way.
If commands for Index Check other than "exist” are used, for example "running", then the process would need to open the index and in that case somehow ensure that no other users are using the system at the time. (Hence the use of “exit”)
The script will generate a csv file of all corrupt indexes with all the information needed to rebuild the index in question. This log file will need to be checked on a daily bases. Refer to the section “Recovering Indexes”
Worst case the Index can be rebuilt from scratch should there be no snapshot old enough to go back to.
NOTE: The Indexing Service isn’t supposed to be running when you do this!