When dealing with a 350GB fulltext index containing hundreds of thousands of small files, traditional backup methods that require stopping services become impractical. The downtime window grows unacceptably long, and consistency becomes a major concern when files are constantly being modified.
VSS works by creating point-in-time snapshots of volumes while maintaining file system consistency. The key components relevant to our scenario:
Writer: The indexer application (if VSS-aware)
Requester: CommVault Galaxy 7.0 backup software
Provider: Microsoft Software Shadow Copy Provider
Storage: Separate volume for shadow copy storage
For our specific environment (Windows Server 2003 SP2):
1. Configure VSS through Computer Management → Disk Management
2. Select the source volume → Properties → Shadow Copies
3. Set the storage volume (must be different from source)
4. Configure schedule for daily snapshots
5. Set appropriate storage size (minimum 350GB + overhead)
There are multiple ways to access the shadow copies programmatically:
Method 1: Using VSSADMIN Command Line
vssadmin list shadows
vssadmin create shadow /For=C:
Method 2: VBScript Automation
Set objWMIService = GetObject("winmgmts:\\.\root\cimv2")
Set objShadow = objWMIService.Get("Win32_ShadowCopy")
errResult = objShadow.Create("C:\", "ClientAccessible", strShadowID)
Method 3: PowerShell Alternative
$shadow = (gwmi -list win32_shadowcopy).Create("C:\", "ClientAccessible")
$shadowID = $shadow.ShadowID
$shadowPath = (gwmi win32_shadowcopy | ? {$_.ID -eq $shadowID}).DeviceObject
To make CommVault work with VSS snapshots:
- Enable "Use Volume Shadow Copy" in backup job properties
- Configure pre/post commands if special handling needed
- Set appropriate timeout values for large volumes
For optimal performance with large I/O-heavy volumes:
- Place shadow storage on fast disks (preferably separate array)
- Monitor performance during first few backup cycles
- Consider differential backup strategies between full VSS backups
Some potential problems and solutions:
Insufficient storage space:
vssadmin resize shadowstorage /For=C: /On=D: /MaxSize=400GB
Writer timeouts:
vssadmin list writers
Check application logs for VSS errors
Backup failures:
vssadmin list shadows /all
Verify shadow copies are actually being created
When dealing with large, I/O-intensive volumes - particularly those containing filesystem-based fulltext indexes with hundreds of thousands of small files - traditional backup approaches present significant challenges. Stopping the indexer service for hours during backup operations creates unacceptable downtime, especially when dealing with 350GB+ volumes where backup windows can stretch painfully long.
Windows Volume Shadow Copy Service (VSS) provides the perfect solution by creating point-in-time snapshots that:
- Maintain file consistency without service interruption
- Allow backup operations to run against the snapshot instead of live files
- Eliminate the need for lengthy service outages
Here's how to properly configure VSS for your scenario on Windows Server 2003 SP2:
@echo off
:: Configure VSS settings
vssadmin add shadowstorage /for=C: /on=D: /maxsize=10%
vssadmin create shadow /for=C:
:: Map the shadow copy to a drive letter
setlocal
for /f "tokens=2 delims= " %%A in ('vssadmin list shadows ^| find "Shadow Copy Volume"') do (
set SHADOW_DEVICE=%%A
)
subst X: %SHADOW_DEVICE%
endlocal
To make your CommVault Galaxy 7.0 backups work with VSS snapshots:
- Create a pre-backup script that creates the shadow copy
- Configure your backup job to target the shadow copy drive letter
- Add a post-backup script to remove the temporary drive mapping
For more robust automation, here's a VBScript solution:
Set objShell = CreateObject("WScript.Shell")
Set objFSO = CreateObject("Scripting.FileSystemObject")
' Create shadow copy
strCommand = "vssadmin create shadow /for=C:"
intReturn = objShell.Run(strCommand, 0, True)
If intReturn <> 0 Then
WScript.Echo "Error creating shadow copy"
WScript.Quit 1
End If
' Get shadow copy device path
Set objExec = objShell.Exec("vssadmin list shadows")
strOutput = objExec.StdOut.ReadAll
arrLines = Split(strOutput, vbCrLf)
For Each strLine in arrLines
If InStr(strLine, "Shadow Copy Volume:") > 0 Then
strShadowDevice = Trim(Split(strLine, ":")(1))
Exit For
End If
Next
' Map drive letter
objShell.Run "subst X: " & strShadowDevice, 0, True
- Schedule snapshots during periods of relatively low I/O activity
- Monitor shadow storage allocation to prevent volume exhaustion
- Test restore procedures regularly to ensure snapshot integrity
- Consider implementing PowerShell scripts for more modern environments
If you encounter problems:
- Check available storage space in your shadow copy storage area
- Verify the Volume Shadow Copy service is running
- Ensure proper permissions for the account running the backup
- Review event logs for VSS-related errors