Windows 7 – Recovering a deleted Offline Files Cache

Volume Shadow Services and Robocopy to the rescue!

Offline Files can be a fickle beast. Mighty useful, but fickle. I’ve got one user I support whose offline files cache constantly finds itself in a corrupt state, with no logical explanation as to why. The fix is to reinitialise the cache, which has been keeping them going until I can work out why this keeps happening.

The trouble with constantly resetting the cache is that you increase the probability of loosing things. Until now it hadn’t been an issue, as it’s only older files which weren’t syncing. But recently a folder of new work didn’t sync with the server. When the cache was reinitialized again: bam! Folder gone!

Thankfully, when you run the Microsoft Fix It tool, a Volume Shadow Services snapshot is created (this has happened on all of the computers I’ve seen, but it is possible it doesn’t always create it). The Offline Files cache is stored in C:\Windows\CSC. If you are able to access a previous version of the Windows folder, then the CSC folder should have your files in it.

The trouble is, you need to change permissions of the folder to open it up and extract the documents needed. You can’t do this with a previous copy as everything in there is read-only.

The solution is to use Robocopy, the brilliant robust file copy tool provided since Windows Vista and Windows Server 2008 R1, to copy the previous version out to a temporary location so you can modify its permissions. Here’s how:

  1. Open up the Windows folder for the previous version (right click > Properties > Previous Versions > choose the version > Open), right click in that window and open Properties.
  2. Find the UNC path for the previous version’s location. This is something like \\localhost\c$\@GMT-2013.03.04-01.00.00\Windows
  3. Create a folder somewhere on an NTFS volume large enough to store a copy of the CSC folder.
  4. Load up command line and run this command: robocopy “\\localhost\c$\@GMT-2013.03.04-01.00.00\Windows” “C:\CSCTemp” /e /copyall /zb
    (the /zb command ensures it is in backup mode, which generally bypassed access denied issues)
  5. Watch it copy your folder structure and files.
  6. Go to your newly created folder and make yourself the owner (Properties > Security > Advanced > Owner > choose your own account and set it recursively)
  7. You should now be able to navigate through the new folder and copy any files you want back to their correct location

Hopefully this works for you. If a previous version doesn’t exist for that folder, you may need to resort to disk recovery tools.

Credits : This article if from someone else. It has only been tested and approved by myself.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s