How to troubleshoot VSS using Diskshadow

book

Article ID: 100037951

calendar_today

Updated On:

Description

Description

How to troubleshoot VSS using DiskShadow (for more details see Microsoft Documentation referenced under General).
The Example given within this article is specifically for the Exchange VSS writer.


General:

DiskShadow
https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/diskshadow

Diskshadow.exe is a tool that exposes the functionality offered by the volume shadow copy Service (VSS).
By default, Diskshadow uses an interactive command interpreter similar to that of Diskraid or Diskpart. Diskshadow also includes a scriptable mode.

 


Example:
This example is backing up Exchange 2010 on Server 2008 R2.  The Example script below takes a snapshot of the Exchange writer components, exposes it as the Y drive, and writes a log to C:\diskshadow-log.txt

ExchangeSnapshot1.txt (Script)
-----------------------------------------------------------------------------------------------------------------------------------------------
set verbose on

set context persistent

# Exclude other in-box writers

writer exclude {e8132975-6f93-4464-a53e-1050253ae220}
writer exclude {2a40fd15-dfca-4aa8-a654-1f8c654603f6}
writer exclude {35E81631-13E1-48DB-97FC-D5BC721BB18A}
writer exclude {be000cbe-11fe-4426-9c58-531aa6355fc4}
writer exclude {4969d978-be47-48b0-b100-f328f07ac1e0}
writer exclude {a6ad56c2-b509-4e6c-bb19-49d8f43532f0}
writer exclude {afbab4a2-367d-4d15-a586-71dbb18f8485}
writer exclude {59b1f0cf-90ef-465f-9609-6ca8b2938366}
writer exclude {542da469-d3e1-473c-9f4f-7847f01fc64f}
writer exclude {4dc3bdd4-ab48-4d07-adb0-3bee2926fd7f}
writer exclude {41e12264-35d8-479b-8e5c-9b23d1dad37e}
writer exclude {12ce4370-5bb7-4C58-a76a-e5d5097e3674}
writer exclude {cd3f2362-8bef-46c7-9181-d62844cdc062}
writer exclude {dd846aaa-A1B6-42A8-AAF8-03DCB6114BFD}
writer exclude {B2014C9E-8711-4C5C-A5A9-3CF384484757}
writer exclude {BE9AC81E-3619-421F-920F-4C6FEA9E93AD}
writer exclude {F08C1483-8407-4A26-8C26-6C267A629741}
writer exclude {6F5B15B5-DA24-4D88-B737-63063E3A1F86}
writer exclude {368753EC-572E-4FC7-B4B9-CCD9BDC624CB}
writer exclude {5382579C-98DF-47A7-AC6C-98A6D7106E09}

# Require Exchange writer

writer verify {76fe1ac4-15f7-4bcd-987e-8e1acb462fb7}

# Take snapshot

begin backup
add volume c: alias vss_test_c
add volume d: alias vss_test_c
create

# Expose snapshot as drive y:
expose %vss_test_c% y:
end backup

-----------------------------------------------------------------------------------------------------------------------------------------------

Below is the command for DiskShadow utility, you need to run this from an elevated command prompt:

"diskshadow /s C:\ExchangeSnapshot1.txt /l c:\diskshadow-log.txt"

To dismount the drive follow the steps below:

  1. Open elevated command prompt
  2. Type Diskshadow, and press enter
  3. Type unexpose y:, and press enter


-Note: This does not delete the shadow copy, it only unmounts the volume so the Volume Shadow copy framework can delete the snapshot as needed.
To modify this script to access different writers run “Vssadmin List Writers” from a command prompt, and include the writer GUID you want to backup.  The GUID will change from version to version of Exchange so be mindful of which version you are working with. Also do not include multiple writers in the included components.
 

Issue/Introduction

How to troubleshoot VSS using Diskshadow