Do useful things with the volume shadow copy service (VSS)
The Volume Shadow Copy Service (VSS) takes a snapshot of an NTFS drive at a point in time. The clever thing about VSS is that it doesn't copy anything — it starts with the assumption that nothing has changed and then keeps track of every change to the snapshot so only changes need to be stored.
From Windows Vista on it's possible to mount a shadow copy as a drive letter or share. ShadowTask is a command line tool that creates a VSS copy, mounts it as a drive and then runs a program or batch file. For example:
ShadowTask C V dostuff.bat
Creates a copy of C:, mounts it as V: and then runs dostuff.bat.
Let's say you want to copy a locked file — maybe some outlook personal folders. Dostuff.bat could contain:
copy V:\Users\You\AppData\Local\Microsoft\Outlook.pst C:\Users\You\Desktop\OutlookBackup.pst
Bingo, you have a copy of your PST without shutting down Outlook.
Download: ShadowTask.zip (50.86 kb)
The ZIP contains both 32 and 64 bit versions of the tool. You must use the version that matches your platform. ShadowTask supports Windows Vista and 7. XP doesn't support mounting a shadow copy so ShadowCopy will fail if you try to use it on XP. ShadowCopy must run as admin (elevated).
Related Posts
- Backup locked files on Windows 10: Volume Shadow Copy Update
- Video timeout on XP and Vista (power management)
- Folder Insights
- Reboot computer in C# / .NET
- Download a Sharepoint File with GraphServiceClient (Microsoft Graph API)
(Published to the Fediverse as: Do useful things with the volume shadow copy service (VSS) #code #vss ShadowTask mounts a volume shadow copy to a drive letter using VSS and then lets you run a batch file (maybe to copy a locked file or backup the entire drive) )
Add Comment
All comments are moderated. Your email address is used to display a Gravatar and optionally for notification of new comments and to sign up for the newsletter.