I experienced a couple of issues where I could not restore a previous version using the built in Microsoft (Previous Versions function.)

The problem was a combination of not being able to copy the file as the path + filename exceeded the 260 character directory + filename character limit.
Another issue was not having security permission over the files.

Steps

The snapshot takes a copy of the ACL at that point in time. To access the files, we use psexec launched as the system user. If the system user was removed from the ACL, then there may be another issue.

  1. Download and extract psexec
  2. Open an administrative command prompt
  3. Browse to the folder containing psexec.exe
  4. Run psexec.exe \\servername /s cmd.exe (if you experience problems, try the FQDN for the servername.)

Once you have your new command prompt you can mount the shadow copy as normal and try robo-copying the folder to the active file system. Once you have an active (writeable) copy you should be able to seize ownership.

At the command line

  1. vssadmin list shadows > shadows.log
  2. :\> notepad shadows.log

Find the shadow copy you want to mount in shadows.log. You are looking for the Shadow Copy Volume guid. You’ll need to look at the Original Volume and the creation time. Once you have the guid you need to run the following where ZZZ is an integer value.

  1. mklink /d C:\shadow \\?\GLOBALROOT\Device\HarddiskVolumeShadowCopyZZZ

Now use robocopy to grab the folder you want from C:\shadowcopy and copy it to a suitable location on the active system such as C:\Temp\restore

Once you have finished copying the files you need to remove the symbolic link:

  1. rmdir C:\shadow

Note: You won’t be able to copy the files if SYSTEM was denied access to the files/folders either.

Robocopy script:

@Echo Off
@For /F “tokens=1,2,3,4 delims=/ ” %%A in (‘Date /t’) do @(
Set DayW=%%A
Set Day=%%B
Set Month=%%C
Set Year=%%D
)

robocopy “C:\Source\\” “C:\Destination\\” *.* /S /E /COPY:DATO IPG:10 /R:3 /W:60 /MIR /SEC /FFT /Z /XA:H /LOG+:%Year%-%Month%-%Day%-Restored_Data.log /NDL /NP

Source

This guide is based upon the method from the responses in the following post.
http://community.spiceworks.com/topic/391471-issue-with-permissions-on-previous-versions-folder


Leave a Reply

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

 

%d bloggers like this: