HappySCCM

/

/

One Stray Backslash: Fixing SMS Writer VSS_E_WRITERERROR_TIMEOUT in ConfigMgr Backup


Filed under: Site Maintenance, Backup & Recovery, VSS

If your ConfigMgr site backup suddenly started failing with VSS_E_WRITERERROR_TIMEOUT and a pile of “is not readable” errors — and nothing on the box obviously changed — this post is for you. The symptom looks like a broken Volume Shadow Copy subsystem. The actual cause, in the case I recently worked through, was a single extra backslash in a registry value. Here’s the full story, the evidence trail, and the fix.

The symptom

The Backup Site Server maintenance task fails. smsbkup.log is loud about it:

After PrepareForBackup SMS Writer status = FAILED_AT_PREPARE_BACKUP.
Error: VSS_E_WRITERERROR_TIMEOUT. Error Code = 0x800423f2.
...
Error: Failed to backup ...\INBOXES up to ...\SMSServer\inboxes:
   ...\INBOXES is not readable..
Error: Backup Failed  for Component - ZZZBackup\SiteServer\SMSServer\inboxes.
...
WARNING: SMS backup failed for atleast one component. Error message -
   ...\BackupTemp\SMSbkSiteRegSMS.dat is not readable.
SMS_SITE_BACKUP failed. Please see previous errors.

Interestingly, the SQL side succeeds — Backup Succeeded for Component - CM_ZZZ and the SQL Writer goes to STABLE. It’s only the file portion (the SMS Writer) that dies, and it takes every site-server file component down with it: AdminUIContentStaging, inboxes, Logs, data, srvacct, CD.Latest, install.map, and the site registry export.

The trap: it looks like a VSS problem

Every instinct says “VSS writer is hung.” And the standard checks reinforce it. vssadmin list writers shows exactly what you’d expect from a hung writer:

Writer name: 'SMS Writer'
   Writer Id: {03ba67dd-dc6d-4729-a038-251f7018463b}
   State: [7] Failed
   Last error: Timed out

Every other writer is Stable. The SMS_SITE_VSS_WRITER service is Running. The Application event log has the matching VSS event 8229:

A VSS writer has rejected an event with error 0x00000000...
Operation: PrepareForBackup event
Writer Name: SMS Writer
Command Line: "...\bin\x64\smswriter.exe"

At this point it is very tempting to restart SMS_SITE_VSS_WRITER, restart SMS_EXECUTIVE, add shadow storage, reboot, and call it a day. Don’t stop here — those steps won’t fix it, because the writer isn’t actually stuck. It’s failing on purpose, every single run, for a concrete reason. And that reason is only visible one log deeper.

The real evidence: smswriter.log

smswriter.log (in the ConfigMgr Logs folder) records what the writer does during OnPrepareBackup. Line up a working night against a failing one and the cause jumps out.

A night when backup worked:

Successfully exported ...HKLM\Software\Microsoft\SMS to
   C:\Program Files\Microsoft Configuration Manager\BackupTemp\SMSbkSiteRegSMS.dat.

The night it started failing:

~Cannot create C:\Program Files\Microsoft Configuration Manager\\BackupTemp,
   [error code: 123, error message: The filename, directory name, or volume label syntax is incorrect.].
Failed to export ...SMS up to ...SMSbkSiteRegSMS.dat; CTool::CreateDir was unable to
   create temporary backup destination path C:\Program Files\Microsoft Configuration Manager\\BackupTemp

Look closely at the path: Microsoft Configuration Manager\\BackupTemp. A doubled backslash. And it wasn’t just that one path — from the same run onward, every metadata path picked it up too: ...MANAGER\\BIN, ...MANAGER\\INBOXES, ...MANAGER\\CD.LATEST, where the working run showed clean single backslashes.

Win32 error 123 is ERROR_INVALID_NAME — “The filename, directory name, or volume label syntax is incorrect.” CreateDirectory() refuses the malformed ...Manager\\BackupTemp segment and returns 123.

Root cause

The SMS Writer builds its temporary backup path by concatenating the ConfigMgr Installation Directory registry value with \BackupTemp. That value is supposed to be:

C:\Program Files\Microsoft Configuration Manager

Something appended a trailing backslash to it:

C:\Program Files\Microsoft Configuration Manager\

So the concatenation produces ...Manager\ + \BackupTemp = ...Manager\\BackupTemp, and Windows rejects it.

From there the failure cascades in a way that perfectly explains the misleading top-level symptom:

  1. CreateDir fails with error 123, so BackupTemp never gets created.
  2. Because BackupTemp doesn’t exist, the site registry export (SMSbkSiteRegSMS.dat) fails.
  3. The SMS Writer aborts OnPrepareBackup.
  4. VSS marks the writer FAILED_AT_PREPARE_BACKUP and ultimately reports VSS_E_WRITERERROR_TIMEOUT (0x800423f2), leaving it in State: Failed / Last error: Timed out.
  5. With the writer failed at prepare, the shadow copy for the site-server files is invalid — so every file component copy fails with “is not readable.”

One stray backslash, and the whole file backup collapses into what looks like a VSS timeout. This is also why a service restart or reboot doesn’t help: the bad value lives in the registry and survives both.

The fix

1. Confirm the bad value. Expect a trailing backslash:

Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\SMS\Setup' | Select-Object 'Installation Directory'

2. Back up the key, then correct it so it matches your real install path with no trailing backslash:

reg export "HKLM\SOFTWARE\Microsoft\SMS\Setup" C:\Temp\SMS_Setup_backup.reg

Set-ItemProperty 'HKLM:\SOFTWARE\Microsoft\SMS\Setup' `
  -Name 'Installation Directory' `
  -Value 'C:\Program Files\Microsoft Configuration Manager'

While you’re in there, check these for the same trailing-backslash mistake:

  • HKLM:\SOFTWARE\Microsoft\SMS\Identification
  • HKLM:\SOFTWARE\Wow6432Node\Microsoft\SMS\Setup

3. Restart the writer so smswriter re-reads the value, and confirm it clears:

Restart-Service SMS_SITE_VSS_WRITER
vssadmin list writers   # SMS Writer should now read: State: [1] Stable / Last error: No error

4. Re-run the backup (kick the Backup Site Server task, or run it on demand) and tail smsbkup.log. Success looks like:

After DoSnapshotSet SMS Writer status = STABLE.
...
Backup Succeeded  for Component - ZZZBackup\SiteServer\SMSServer\inboxes.

That’s it. No reinstall, no VSS re-registration, no shadow-storage surgery.

How to recognize this one in the wild

  • Top-level symptom is VSS_E_WRITERERROR_TIMEOUT (0x800423f2) and “is not readable” on every site-server file component, while SQL backs up fine.
  • vssadmin list writers shows SMS Writer → Failed / Timed out, everything else Stable.
  • The tell is in smswriter.log: Cannot create ...\\BackupTemp with error code 123, and a doubled backslash (\\) in the paths.
  • It typically starts overnight with no obvious change — because the trigger was an edit to the Installation Directory registry value (a script, an installer, a hotfix, or a well-meaning manual tweak), not anything about VSS or disk.

Takeaway

When the SMS Writer times out at PrepareForBackup, resist the urge to fix VSS. Go straight to smswriter.log and read the OnPrepareBackup block. In this case the writer wasn’t stuck — it was telling us, clearly and every night, that it couldn’t create a folder because someone left a backslash where it didn’t belong. The logs almost always know. You just have to read one level deeper than the error that’s screaming at you.

Happy backing up.



Leave a Reply

Your email address will not be published. Required fields are marked *