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
- On local computer, go to shared folder on SBS server (via mapped drive), e.g. J:\Projects\Foo\Bar
- Right click on folder and select Properties
- Click on the Previous Versions tab.
- Select a shadow copy and click Open
- In newly opened window, select folder/file and press Ctrl-C to copy.
- 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.
I had the exact same problem in Server 2008 R2 and this is how I solved it:
Right click on the folder you're trying to restore from shadow copy and chose Previous Versions. Chose a date and click on Open.
Right click on any file or folder within the previous folder and chose Properties. On the General tab copy what's shown in 'location', e.g.:
\\localhost\D$\@GMT-2011.09.20-06.00.04\_Data
Open cmd.exe and type in:
Open PowerShell and use robocopy to copy content of X: e.g.:
Check that all files have been copied.
When finished type
subst X: /D
in the cmd (Command Prompt) windowHave 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.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"