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

I have a backup batch file that uses Robocopy to backup my files (note this example contains newlines that you should remove):

robocopy "C:\" "G:\Default\RoboCopyBackup\C" /XF Pagefile.sys /XD 
"System Volume Information" "Recycler" "Temporary Internet Files"
"Installer Cache" "Temp" /E /R:1 /W:0 /TEE /XJ

This should create a folder structure on the external backup drive like so:

G:\Default\RoboCopyBackup\C\...

However, G: appears totally empty.

What is weird, is that the folders and files are there! If I type the above path into the address bar, I see all the files and folders!

Can anyone help me understand why? I think it might be some NTFS-based ownership/permissions thing but I'm not sure.

share|improve this question
    
what does attrib * show if run at the root of g: –  tony roth Jun 28 '10 at 20:42
add comment

3 Answers

I've never gotten a satisfactory answer to this problem, but it seems to be a combination of copying the root of a drive (in your case C:\) and the /COPYALL flag.

RoboCopy seems to apply System and Hidden attributes to the target folder when copying an entire source drive. So far I've found two work arounds...

1) run ATTRIB after your run robocopy. In your case :

attrib -s -h "G:\Default\RoboCopyBackup\C"

2) change /COPYALL to /COPY:DTSOU (excluding the A for copy attributes). In your case I don't see a copyall flag listed, but I've seen it quite frequently in posts about this problem. Removing the attributes may not be a practical solution in your case, so your mileage may vary on this one.

HTH, -eric

share|improve this answer
add comment

Robocopy will create a folder path for you based on the attributes of the source folder you are copying. Copying an entire drive will cause the folder to be hidden and marked as a 'system folder'.

You can make the folder visible by unchecking "Hide protected operating system files (Recommended)" on the view tab of the Window Explorer's folder options window.

share|improve this answer
add comment

I had this happen this past weekend, I determined it to be due to robocopy failing to copy everything, in my instance it failed because some genius had the server performing automatic updates in the middle of my scheduled maintenance window. after I restarted robocopy and let it finish the directory showed up just fine.

EDIT:

Thinking about it some more, I had a similar problem crop up when attempting to copy the folder structure off the root of a drive and it failed when copying the system volume information.

share|improve this answer
add comment

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.