ROBOCOPY backup of root of non-OS partition results in hidden folder
What do you use for verification? ROBOCOPY lacks a verify option, so it does not verify that the copied destination files match the original files. Some backup software has built-in verification. Do you run some sort of verification after a ROBOCOPY backup?
October 21st, 2012 8:29am

None of the native copy commands include a verification option. If you feel that verification is necessary then you would have to write your own script to do it. I think you would waste your time. The processes appear to be so robust at the hardware level that copy errors are detected and fixed without you being aware of them, presumably by using CRC methods.
Free Windows Admin Tool Kit Click here and download it now
October 21st, 2012 8:40am

Are there any risks in using /MIR rather than /E plus /PURGE? The MS page says this: The /MIR option is equivalent to the /e plus /purge options with one small difference in behavior: With the /E plus /PURGE options, if the destination directory exists, the destination directory security settings are not overwritten. With the /MIR option, if the destination directory exists, the destination directory security settings are overwritten. I understand the words, but are there risks that I haven't thought of? Is there any reason that I should not use /MIR ? Also, the command ROBOCOPY "D:" can cause problems. To make your backup command robust, you should code it like so: ROBOCOPY "D:\" This seems to be incorrect. When I use "D:\" (including trailing slash), Robocopy returns the error: Invalid Parameter #3 When I use "D:" (no trailing slash), Robocopy works and the drive contents are copied.
October 21st, 2012 8:50am

I use Microsoft ROBOCOPY for file-based backups and mirroring. One of my routines backs up the entire D: volume. D: is a partition of my HD, which contains only user data files. It is not the OS partition. I use this command line to backup the entire contents of D: ROBOCOPY "D:" "W:\Backup Files\Data_D" /S /MT:16 /COPYALL /NP /V /XA:SH /XJ /XD "$RECYCLE.BIN" "System Volume Information" /PURGE /log:"E:\backup_log_W_data.txt" Problem: When I look on the external backup drive, that backup of D: is hidden when I try to view that drive as normal user. I have to go into Folder Options and uncheck "Hide protected operating system files". Is that because it's including some hidden system files in backup? Is it possible somehow to backup the entire D: drive without the resulting backup being treated as a hidden operating system file?
Free Windows Admin Tool Kit Click here and download it now
October 22nd, 2012 8:47am

I have observed the same phenomenon on several occasions. It seems to be a bug in robocopy.exe. You can easily get around it by adding this command to your existing batch file: attrib /d -s -h "W:\Backup Files\Data_D" Note also that the command ROBOCOPY "D:" can cause problems. To make your backup command robust, you should code it like so: ROBOCOPY "D:\"
October 22nd, 2012 9:29am

Thank you for the reply. That is very useful! You gave me the idea, so I did further reading. I also added /S to make it recursive throughout sub-folders. That would seem necessary, wouldn't it? I used this: ATTRIB -S -H "W:\Backup Files\Data_D" /S /D That seems to do the trick. Thanks for the tip about using ROBOCOPY "D:\" instead of ROBOCOPY "D:". I didn't know that. "D:" appeared always to work, so I never knew that it needed a trailing slash. I excluded it because longer folder names are supposed not to have trailing slash. Also, I've been using /log so ROBOCOPY writes to a log file. Is there a way to have a simpler, friendlier log that tells me if anything failed? I really just want to know if everything backed up okay or not? Or, can I forgo the log and have some display in CMD to tell me if the backup was successful or not?
Free Windows Admin Tool Kit Click here and download it now
October 22nd, 2012 1:52pm

When you use D: then you get access to whatever folder you happen to be in on drive D:. It could be the root D:\, it could be D:\My Files or it could be anything else. When you mean the root then you must write D:\. If you want a friendly output from the robocopy log then you must write your own script to extract whatever information you wish from the log. This is what many administrators do (myself included).
October 22nd, 2012 2:11pm

Thanks. Is there a site that gives examples of scripts to extract relevant information from ROBOCOPY logs? Do you create a normal log first, with the /log option, and then process it afterwards to display just the parts that you want? Also, regarding removing attributes, is it possible to do it via options in ROBOCOPY rather than the separate ATTRIB command? I found these ROBOCOPY options listed on a /technet.microsoft.com page: a+:[RASHCNET] Adds the specified attributes to copied files. /a-:[RASHCNET] Removes the specified attributes from copied files.
Free Windows Admin Tool Kit Click here and download it now
October 22nd, 2012 3:00pm

I am not aware of any robocopy switches that would remove the hidden attribute of the destination folders. You would have to experiment. Using a combination of robocopy + attrib in a batch file seems a less time-consuming option. The current script languages to do this type of processing are VB Script or PowerShell. I doubt that you will find examples just for this specific purpose. Best to ask a friend with scripting skills to help you.
October 22nd, 2012 4:07pm

I am not aware of any robocopy switches that would remove the hidden attribute of the destination folders. Here's the page reference: http://technet.microsoft.com/en-us/library/cc733145(v=ws.10).aspx#BKMK_remarks Thanks
Free Windows Admin Tool Kit Click here and download it now
October 22nd, 2012 4:31pm

Hi, Based on my experience, there is no risk with using /mir option or /e plus /purge if there is no destination directory exists. The only consideration would just like the explanation. We only need to choose a proper on for whether we would like to keep the destination directory security settings or not when there is destination directory exists. Thanks, SpencerPlease remember to click Mark as Answer on the post that helps you, and to click Unmark as Answer if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
October 27th, 2012 6:27am

Thanks.
Free Windows Admin Tool Kit Click here and download it now
October 30th, 2012 9:11am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics