Strive for IT Excellence

Backing up Enterprise Vault using Trigger Files

Here is some information on backing up Enterprise Vault with trigger files:Enterprise Vault

Do the following for your partition(s):

-In the EV Admin Console get Properties on your Vault Store(s) and on the General tab take note of what the database name is
-Open SQL Management Studio and run the following command and take note of the total counts:

Use EVVSMailboxVaultStore_2 /* <<<<<<<< Enter your vault store DB name */
select count (*) from dbo.JournalArchive where Backupcomplete = '0'

Use EVVSMailboxVaultStore_2 /* <<<<<<<< Enter your vault store DB name */
select count (*) from dbo.WatchFile where itemsecured = '0'

-In the EV Admin Console right-click your Partition(s) and get Properties
-Click on the Backup tab and choose the option to Check for a trigger file. Default of 60-minutes is fine

-Edit the Pre and Post scripts below. (Update the partition path (use UNC instead of C:\xxx). This is the root path for the partition, no year sub-folders. You can have multiple lines. ALSO update the PowerShell commands for your site by following this technote: Generating PowerShell backup commands for your environment: https://www.veritas.com/support/en_US/article.000102791 and don't forget to include C:\Windows\SysWOW64\WindowsPowerShell\v1.0\ for 64-bit)

-Once you have the Pre and Post scripts updated for you environment, AND you know the data has actually been backed up, run the Pre script
-Once the Pre script has finished (and you have verified it was successful), run the Post script
-Open the partition location in Windows Explorer and make sure the trigger file is there and named .old with the current date

-In SQL Management Studio run the above queries and take note of the counts. Note: the counts could rise as new items are being archived. So if it's a large environment it may be hard to monitor

-In the EV Admin Console right-click again on the Partition that you were working with and get Properties. Click on the Backup tab and take note of the Dates to make sure they are current

-Do this for all partitions in case you have some closed ones where items were not secured

-InfrastructureNote: Don't forget to check SQL fragmentation. You will want to follow this technote: SQL Maintenance/Backups: : http://www.veritas.com/docs/000040169

You want have maintenance run per the technote when services are stopped for EV (if possible); or during the window in between when the Pre and Post scripts run as EV will be in backup mode.

The first part of this SQL technote is for database backups; the second half is for maintenance:

For maintenance, from the list of tasks, choose:
Back Up Database (Full)
Shrink Database (this process is optional, but highly recommended)
Back Up Database (Transaction Log)
Rebuild Index
Update Statistics
Maintenance Cleanup Task

Logical Scan Fragmentation
Value should be under 1%
Latency occurs once logical scan fragmentation exceeds 10%.
Once fragmentation exceeds 50%, indexes are no longer used

Extent Scan Fragmentation -
Value should be under 50%
Performance issues may occur for fragmentation over 50%

-After you have finished testing and manually running the Pre and Post scripts, you want to create Windows Scheduled Tasks to execute the Pre and Post scripts. Make sure you edit the Windows Scheduled Tasks to run with elevated permissions and to run when not logged in.

-An alternative, is if you have a backup program that can execute pre and post commands, have these scripts execute there.

Pre script:

REM include closed partitions if items need to be post-processed

del "\\path_to_closed_partition1\ignorearchivebittrigger.old"
del "\\path_to_closed_partition2\ignorearchivebittrigger.old"
del "\\path_to_closed_partition3\ignorearchivebittrigger.old"
del "\\path_to_closed_partition4\ignorearchivebittrigger.old"
del "\\path_to_open_partition1\ignorearchivebittrigger.old"

C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell -psconsolefile "C:\Program Files (x86)\Enterprise Vault\EVShell.psc1" -command "& {Set-VaultStoreBackupMode -Name xx_name_xx -EVServerName xx_site_xx.com -EVObjectType Site}"

C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell -psconsolefile "C:\Program Files (x86)\Enterprise Vault\EVShell.psc1" -command "& {Set-IndexLocationBackupMode -EVServerName xx_site_xx.com -EVSiteName xx_name_xx}"

REM use this command to stop EV services if you schedule maintenance with services stopped
REM net stop EnterpriseVaultAdminService /y

Post script:

 net start EnterpriseVaultAdminService
net start "Enterprise Vault Directory Service"
net start EnterpriseVaultIndexingService
net start EnterpriseVaultShoppingService
net start EnterpriseVaultStorageService
net start EnterpriseVaultTaskControllerService

ECHO OFF> "\\path_to_partition1\ignorearchivebittrigger.txt"
ECHO OFF> "\\path_to_partition2\ignorearchivebittrigger.txt"
ECHO OFF> "\\path_to_partition3\ignorearchivebittrigger.txt"
ECHO OFF> "\\path_to_partition4\ignorearchivebittrigger.txt"
ECHO OFF> "\\path_to_open_partition1\ignorearchivebittrigger.txt"

C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell -psconsolefile "C:\Program Files (x86)\Enterprise Vault\EVShell.psc1" -command "& {Clear-VaultStoreBackupMode -Name xx_name_xx -EVServerName xx_site_xx.com -EVObjectType Site}"

C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell -psconsolefile "C:\Program Files (x86)\Enterprise Vault\EVShell.psc1" -command "& {Clear-IndexLocationBackupMode -EVServerName xx_site_xx.com -EVSiteName xx_name_xx}"

REM use this command to restart storage
REM C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell -psconsolefile "C:\Program Files (x86)\Enterprise Vault\EVShell.psc1" -command "& {Restart-Service EnterpriseVaultStorageService}"