Folder Recovery when you run into a path length error.
When recovering files and folders normally you can just use the windows previous versions and copy out of a previous version. If the source you are copying from has so many folders that the path length ends up exceeding 255 characters you will get an error message during the copy and it will abort. Robocopy is not affected by that restriction and can be used to recover in this scenario.
Here are steps you would perform to recover from a previous snapshot.
- Create a flexclone of the volume mounting a snapshot you know has the data missing
- Create a temp share to use as a source for your robocopy
- Run a robocopy to the original destination
- Verify the folder and file count look correct
- Remove the temp share
- Remove the flexclone
This doc uses the NetApp OnCommand System Manager (3.1) to accomplish this. This can also be done from the CLI.
Mounting the Flexclone
Open System Manager, double click on the controller that owns the volume you want to recover data from/to. Expand Storage, then Volumes. You should see your volume listed.
Click on the Volume so it is highlighted, up top click on Clone, then Create, then Volume.
Change the name to something that makes sense to you. I use clone_volume, it is easy to remember. Check Thin Provision and find the correct snapshot and click so it is highlighted.
After a minute or two you should see your clone listed.
Next we are going to create a CIFS share to use as a source for robocopy.
Under storage click on Shares, then Create.
In the next window click on Browse.
Expand out the tree until you find your clone then the original folder. Click Ok
I call the share something simple and then click create.
AT this point you can browse out to your newly created share and look at the data.
Next we are ready to robocopy the data back.
I used this to copy from my source Temp to the original destination and create a log file I can use to verify what was copied or see if there were any errors.
robocopy “\\fs01\Temp” “\\fs01\BUShared\College of Professional Studies” /MT:32 /zb /mir /COPY:DATSO /ndl /nfl /w:0 /r:0 /log+:robocopy.txt /xf pagefile.sys
Your logfile should look similar to this at the start.