News

Shadowcopy, Syncovery and selective file restoration.

Shadowcopy, the ability of Windows systems to retain pervious versions of files which can elp in responding to accidental deletions and similar event, is a very useful tool. But imaging you want to restore only new and/or changed files to a drive, and there are many hundreds to restore. Wouldn't it be useful to be able use a tool like Syncovery  to select only the files you really want from the Shadowcopy?

Well, with a bit of thought, such a thing tunrs out to be easy. The key is to 'mount' the desired Shadow copy instance and then point Syncovery at it and then compare and contrast files, set filters and so on.

This is achieved by pinching an idea from the Linux world, that of mountpoints. Yes, Windows does support them, although they are not commonly used.

So this is what you do.

Open an elevated CMD window and identify what Shadow copies are available.

C:Scripts>vssadmin list shadows /for=c:
vssadmin 1.1 - Volume Shadow Copy Service administrative command-line tool
(C) Copyright 2001-2013 Microsoft Corp.

Contents of shadow copy set ID: {613d6db0-21a1-4a16-b806-a4a8b2429458}
   Contained 1 shadow copies at creation time: 13/09/2023 15:00:18
      Shadow Copy ID: {16c067fa-235c-4f86-a015-59726ed33035}
         Original Volume: (C:)\?Volume{7bacf07d-bc20-4d52-b11c-b9e25835283d}
         Shadow Copy Volume: \?GLOBALROOTDeviceHarddiskVolumeShadowCopy19
         Originating Machine: MSI-DATA-02.MSI.NET
         Service Machine: MSI-DATA-02.MSI.NET
         Provider: 'Microsoft Software Shadow Copy provider 1.0'
         Type: ClientAccessible
         Attributes: Persistent, Client-accessible, No auto release, No writers, Differential

Contents of shadow copy set ID: {65165701-fdba-4e6f-b7b4-b5ffd6927398}
   Contained 1 shadow copies at creation time: 14/09/2023 07:00:19
      Shadow Copy ID: {511f92db-f58b-4a35-b073-174ffdfd79e1}
         Original Volume: (C:)\?Volume{7bacf07d-bc20-4d52-b11c-b9e25835283d}
         Shadow Copy Volume: \?GLOBALROOTDeviceHarddiskVolumeShadowCopy20
         Originating Machine: MSI-DATA-02.MSI.NET
         Service Machine: MSI-DATA-02.MSI.NET
         Provider: 'Microsoft Software Shadow Copy provider 1.0'
         Type: ClientAccessible
         Attributes: Persistent, Client-accessible, No auto release, No writers, Differential

Here we see two Shadowcopies, created one day apart. Decide which one to restore files from.

Then mount it as a mountpoint.

C:Scripts>mklink /d c:shadowrestore \?GLOBALROOTDeviceHarddiskVolumeShadowCopy71
symbolic link created for c:shadowrestore <<===>> \?GLOBALROOTDeviceHarddiskVolumeShadowCopy19

Note the trailing '' backslash.

This will then show up in the root of the disk, like this:

  Directory of C:

10/10/2023  15:42    <SYMLINKD>     shadowrestore [\?GLOBALROOTDeviceHarddiskVolumeShadowCopy19]
               0 File(s)              0 bytes

Then just select 'shadowrestore' as the source and the drive as the target for Syncovery and set the filters one wants. Quick & simple!

After you have finished, clean up by using the CLI or File Explorer to delete the mountpoint in the normal way.

 

 

<< Go back to the previous page