ProxyHost with VSS - Truncating Exchange Logs
Overview
Batch Files for Exchange Log
Truncation
Configuring ProxyHost
for Exchange Log Truncation
Considerations
The following section provides instructions for using VSS with a hardware snap
engine and the ProxyHost iDataAgent to
quiesce, unquiesce, and to eventually truncate the Exchange transaction logs. This
is effected by first marking the last consistent log during the quiesce and saving
that information to an ini file, which is referenced
later to truncate the committed Exchange transaction logs from the quiesce time.
A standard ProxyHost backup typically uses two batch files that perform the following
functions:
- PreScan batch file
- VssSnapshot multisnap (performs quiesce, snap, unquiesce)
- VssSnapshot import (imports and mounts hardware snap to destination
client)
- PostBackup batch file
With Exchange log truncation added, the batch file adds the Exchange Log truncation
functionality:
- PreScan batch file
- VssSnapshot multisnap (performs quiesce, marks last consistent log in
ini file, snap, unquiesce)
- VssSnapshot import (imports and mounts hardware snap to destination
client)
- PostBackup batch file
- CVSnaptool –o truncateexchlogs
- HW snap cleanup
@REM Vars
SET VSS_INI_FILE_NAME=%windir%\temp\VSSsnap.ini
SET GalaxyBaseDir=<install_direcory>\Base
@REM snap
"%GalaxyBaseDir%"\vsssnapshot.exe multisnap %VSS_INI_FILE_NAME%
-transportable -markexchlogs -esn <client_name> -vm <InstanceName*> -cn <ClientName>
@REM import "%GalaxyBaseDir%"\vssSnapShot.exe vss import
-verifyexchbackup -esn <client_name> -i %VSS_INI_FILE_NAME% -S <FQDM_of_source_computer>
-vm <InstanceName*> -cn <ClientName>
Example POSTBACKUP (changes in blue)
@REM Vars (changes)
IF '%6'=='1' GOTO BACKUP_SUCCESSFUL
net send <client_name> backup phase did not complete
successfully, so I won't execute the log truncation
exit 1
:BACKUP_SUCCESSFUL
SET VSS_INI_FILE_NAME=%windir%\temp\VSSsnap.ini SET
GalaxyBaseDir=<install_direcory>\Base
@REM Destroy snap "%GalaxyBaseDir%"\vsssnapshot.exe
unsnap -i %VSS_INI_FILE_NAME% -S <FQDM_of_source_computer> -vm <InstanceName*> -cn <ClientName>
@REM Truncate section
"%GalaxyBaseDir%"\CvSnaptool.exe -o truncateexchlogs
–g <storage group name> -ini %VSS_INI_FILE_NAME% -vm <InstanceName*> -cn <ClientName>
* InstanceName is the name used for a Proxy Host instance (by default it is Instance001).
If multiple
instances of Proxy Host are installed use the corresponding instance name, see
Multi Instancing for more information.
Required Capability:
Capabilities
and Permitted Actions
To configure
ProxyHost to truncate Exchange Logs:
- Create the PreScan and PostBackup batch files, using the example scripts
above. These files must reside on the backup host or primary host.
- Install the ProxyHost iDataAgent
on the production server, and the Windows File System
iDataAgent on both the production server
and backup host. Refer to Deployment
- ProxyHost iDataAgent and
Deployment - Windows File System
iDataAgent.
- Configure your environment; see
VSS
for the ProxyHost iDataAgent - Configuration.
- Create a New Subclient,
and configure subclient
content. Click the
Pre/Post Process
tab of the Subclient Properties dialog box. In the PreScan field, type
the path to the batch file file that contains those commands that are to run
before each backup of the subclient, or click Browse to locate and select
the batch file. Do the same for the PostBackup field.
- Perform a backup. For more information, see Backup
- ProxyHost.
Additional Suggestions:
- The vsssnapshot.log file will contain information
about Exchange storage groups, creating and importing the snap (import information
is mostly on the destination machine's vsssnapshot.log
file.)
- The app eventvwr log will contain information
on quiescing the correct Exchange storage groups.
- After the multi-snap operation, your ini
file will contain information regarding the last consistent Exchange log file,
etc., which will be used during the truncateexchlogs
command.
- The ini file must have same path and name
in all scripts that reference it, although the variable name can be different.
- The cvsnaptool –truncate command is sensitive;
certain normal cvsnaptool arguments are not necessary and may cause the Exchange
log truncation to fail. A server name (–x) is
not required, as it is stored in the ini file,
nor is app name (–a) since Exchange is assumed.
- With VssSnapshot, storage groups are quiesced based on the volumes you specify
when initially creating your ini file. Since
it is a volume-based quiesce, it is recommended that you configure Exchange
so that multiple storage groups do not share the same volume, and thus you can
quiesce them individually.
- To selectively truncate storage groups when using VssSnapshot to quiesce
them, you must use the –g switch with the
cvsnaptool truncateexchlogs command. If you
do not, the logs for all Exchange storage groups on that client will be truncated,
regardless of which ones you actually quiesced.
- When using multiple ProxyHost subclients for your Exchange storage groups,
the ini files for each group must have unique
names; using the same ini file name for multiple
subclients creates a risk of them getting overwritten or populated with the
wrong info.
- PostBackup scripts are executed without regard to the success or failure
of the backup attempt itself. However, the PostBackup script contains the log
truncation step and it is very important that log truncation be executed only
after a successful backup. This is ensured by utilizing a status variable, passed
by the Job Manager to the PostBackup phase, in the 'if' statement in the example
script to determine whether log truncation should run or not.