cancel
Showing results for 
Search instead for 
Did you mean: 

Setting vault stores and index locations to backup mode story

Ralfeus
Level 4
Certified
Recently I've upgraded EV 2007 SP5 to EV 8 SP4. After that I've found out I couldn't set vault stores and index locations to backup mode. The errors were:

While trying to set vault store to backup mode:

PS C:\Program Files (x86)\Enterprise Vault> Set-VaultStoreBackupMode -entryid 1C966AE6214C7D949B3FA3DB6655E33391210000EVAPAC
Set-VaultStoreBackupMode : Unable to set backup mode on vault store 'VStore2SEVAPAC2'. Check that storage service is running on computer 'SEVAPAC2'. 
At line:1 char:25 
+ Set-VaultStoreBackupMode <<<< -entryid 1C966AE6214C7D949B3FA3DB6655E33391210000EVAPAC





While trying to set index location to backup mode:

PS C:\Program Files (x86)\Enterprise Vault> Set-IndexLocationBackupMode -EVServerName sevapac2
Set-IndexLocationBackupMode : Unable to notify the indexing service on computer 'SEVAPAC2' of backup mode changes for index locations. Check that indexing service is running on computer 'SEVAPAC2' and start the service if necessary.
At line:1 char:28
+ Set-IndexLocationBackupMode <<<< -EVServerName sevapac2





I have verified Storage service and Indexing service were running.
Because I didn't find any mention of such problem in Google I've created a case to Symantec. Pretty quickly it was found out the problem was caused by lack of permissions of the account, under which I tried to set vault store to backup mode. Under EV system account it worked well. I was given by Symantec technician the KB article http://seer.entsupport.symantec.com/docs/319433.htm and told I'd assign proper tasks to necessary accounts myself.

But soon I've met another problem. Following tasks were missing in the tasks list:
EVT Manage Index Location Backup Mode.
EVT Manage Vault Store Backup Mode.

I tried to create appropriate tasks myself but couldn't find operations:
{IDX} Can manage Index Location Backup Mode
{STO} Can manage Vault Store Backup Mode

Because all tasks and operations are stored in EvAzStore_Svc.xml I checked the file at another EV environment and found out needed operations were defined just in couple lines:

<AzOperation Guid="01271A1A-4DD6-4f4b-993C-FF26C1EC35D9" Name="{STO} Can manage Vault Store Backup Mode" Description="Can manage Vault Store Backup Mode">
   <OperationID>2005</OperationID>
</AzOperation>
<AzOperation Guid="AF2FC935-CC57-4872-93AD-67E3B650FFD7" Name="{IDX} Can manage Index Location Backup Mode" Description="Can manage Index Location Backup Mode">
   <OperationID>3003</OperationID>
</AzOperation>

But EvAzStore_Svc.xml file is just a local copy of the actual data, which is stored in EnterpriseVaultDirectory database. So I added these lines to local file and just updated this XML document in DB using  following PowerShell script:

$reader = new-object System.IO.BinaryReader([System.IO.File]::Open('e:\tools\EvAzStore_Svc.xml', [System.IO.FileMode]::Open)); # as a "e:\tools\EvAzStore_Svc.xml" the modified file path should be used
[byte[]]$data = $reader.ReadBytes(100000); # this is an assumption the file is less than 100000 bytes. In my case it was 85KB
$reader.Close();
$sqlConnection = New-Object System.Data.SqlClient.SqlConnection("Data Source=SQLSERVER;Integrated Security=SSPI;Initial Catalog=EnterpriseVaultDirectory");
$sqlCommand = New-Object System.Data.SqlClient.SqlCommand("update DirectoryEntry set AzStore = @AzStore");
$sqlCommand.Connection = $sqlConnection;
$sqlConnection.Open();
$param = New-Object System.Data.SqlClient.SqlParameter("@AzStore", [System.Data.SqlDbType]::VarBinary);
$param.Value = $data;
$res = $sqlCOmmand.Parameters.Add($param);
$sqlCommand.ExecuteNonQuery();
$sqlConnection.Close();



After that I could see proper operations in Authorization Manager. Then I added necessary role and assigned it to needed account. As a result - I can set vault stores and index locations to backup mode using any account I need different than EV service account.


P.S. I have just found out there is no need to write custom script for updating XML in database. For that nice utility exists called EvAzUtil.exe.
So in my case it looked like this:

EvAzUtil.exe -after E:\temp\EvAzStore_Svc.xml -updatedb
where E:\temp\EvAzStore_Svc.xml is an updated XML file