Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

We have shadow copy enabled on our Windows SBS 2008 server. Attempting to restore a file from shadow copy gave the following error-

The source file name(s) are larger than is supported by the file system. Try moving to a location which has a shorter path name, or try renaming to shorter name(s) before attempting this operation.

The filename has 67 characters, and it's shadow copy path is 170 characters. These seem to be under the NTFS limits (260?).

We tried-

  • Copying to the shortest path possible (C:)
  • Copying to the shortest path possible on both a client computer and the server itself

Is it possible to rename files in a shadow copy, before doing the copy? Any idea why the error is appearing despite the filename size appearing to be within limits?

Steps taken

  1. On local computer, go to shared folder on SBS server (via mapped drive), e.g. J:\Projects\Foo\Bar
  2. Right click on folder and select Properties
  3. Click on the Previous Versions tab.
  4. Select a shadow copy and click Open
  5. In newly opened window, select folder/file and press Ctrl-C to copy.
  6. Open a new Windows Explorer, and paste folder/file onto local drive.

Edit- (Un)fortunately, I am now unable to reproduce this error. The particular files causing the problem have since been deleted, and unable to recreate the error with other, similar files.

share|improve this question
    
Can you lay out exactly where you setup your shadow copies, and how you are trying to restore them (step by step)? I'm looking into this but I need a little help understanding how you're accessing it first. –  Holocryptic Jul 1 '11 at 0:47
    
I've added the steps used to attempt the restore. This is the only method I'm aware of - are there others? –  Spongeboy Jul 7 '11 at 3:59

3 Answers 3

up vote 6 down vote accepted

I had the exact same problem in Srv2008 R2 and this is how I solved it:

  1. Right click on the folder your trying to restore from shadow copy and chose 'Previous versions'. Chose a date and click on open.
  2. Right click on any file or folder within the previous folder and chose 'properties'. Under 'General' copy what reads in 'location' - .e.g.: \localhost\D$\@GMT-2011.09.20-06.00.04_Data
  3. Open cmd.exe and type in: subst X: \localhost\D$\@GMT-2011.09.20-06.00.04_Data
  4. Open powershell and use robocopy to copy content of X: e.g.: robocopy Z: D:\Folder\ /E /COPYALL
  5. Check that all files have been copied.
  6. When finished type subst X: /D in cmd.

Done!

share|improve this answer
    
Did this and confirmed it is working. –  Jake Oct 7 '12 at 10:34
2  
Actually, ROBOCOPY doesn't have the 256 path character limit. May not need the SUBST if using ROBOCOPY. –  Jake Oct 7 '12 at 15:32
    
Great! Thank you –  Selivanov Pavel Aug 21 '13 at 16:28
    
I can confirm that SUBST is not needed when using ROBOCOPY. –  Nic May 16 at 21:44

Have you tried sharing the folder you are trying to restore from? That way you can try opening \server\share\filename instead of \server\share\path....\filename?

If that doesn't work I would suggest try accessing the volumes through the command line where you can use the \\?\ method for access, which has a 32,767 character limitation.

share|improve this answer
    
I don't have the option to share the shadow copy. When I have the shadow folder open (e.g. Statistics (‎Yesterday, ‎6 ‎July ‎2011, ‏‎12:00 PM)), I don't have the option to share in the folder properties. At the moment, I am unable to recreate the issue, but thanks for the link on accessing shadow volumes via the command line! –  Spongeboy Jul 7 '11 at 4:12

Can you get the name/path of the shadow copy file from the 'location' entry of the general tab in the Properties info window, then use the 'subst' command to reduce the long path down to a single letter?

subst Z: "H:\1\2\3\4\5\6\7\I like to create stupid directory names that are very long\8\9"

dir Z: is the same as dir "H:\1\2\3\4\5\6\7\I like to create stupid directory names that are very long\8\9"

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.