Friday, 14 November 2014

Reset VSS Writers




VSS writers are application-specific components for Microsoft's Volume Shadow Copy Service, which ensure the consistency of application data when a shadow copy is created. That's quite useful for creating consistent backups of a system. However, some of these writers go into error states more or less frequently. And Microsoft did not deem it necessary to document how to reset writers without rebooting the entire system (or at least I didn't manage to find that piece of information).
Since this burnt me once too often, I started compiling a list of VSS writers and the services that need to be restarted to reset each of them. Some are rather obvious, others (System Writer for instance) not so much.
VSS Writer
Service Name
Service Display Name
ASR Writer
VSS
Volume Shadow Copy
BITS Writer
BITS
Background Intelligent Transfer Service
COM+ REGDB Writer
VSS
Volume Shadow Copy
DFS Replication service writer
DFSR
DFS Replication
DHCP Jet Writer
DHCPServer
DHCP Server
FRS Writer
NtFrs
File Replication
FSRM writer
srmsvc
File Server Resource Manager
IIS Config Writer
AppHostSvc
Application Host Helper Service
IIS Metabase Writer
IISADMIN
IIS Admin Service
Microsoft Exchange Writer
MSExchangeIS
Microsoft Exchange Information Store
Microsoft Hyper-V VSS Writer
vmms
Hyper-V Virtual Machine Management
NTDS
NTDS
Active Directory Domain Services
OSearch VSS Writer
OSearch
Office SharePoint Server Search
OSearch14 VSS Writer
OSearch14
SharePoint Server Search 14
Registry Writer
VSS
Volume Shadow Copy
Shadow Copy Optimization Writer
VSS
Volume Shadow Copy
SPSearch VSS Writer
SPSearch
Windows SharePoint Services Search
SPSearch4 VSS Writer
SPSearch4
SharePoint Foundation Search V4
SqlServerWriter
SQLWriter
SQL Server VSS Writer
System Writer
CryptSvc
Cryptographic Services
TermServLicensing
TermServLicensing
Remote Desktop Licensing
WINS Jet Writer
WINS
Windows Internet Name Service (WINS)
WMI Writer
Winmgmt
Windows Management Instrumentation
This list is far from complete. It merely contains those writers I already had to deal with and some contributions from fellow administrators.
You can use PowerShell for listing failed writers:
& vssadmin list writers | Select-String -Context 0,4 '^writer name:' | ? {
  $_.Context.PostContext[2].Trim() -ne "state: [1] stable" -or
  $_.Context.PostContext[3].Trim() -ne "last error: no error"
}
or the state of a particular writer:
$name = [Regex]::Escape('writer name')
& vssadmin list writers | Select-String -Context 0,4 "^writer name: .*$name"

No comments:

Post a Comment