Hello all,

Got an issue which hopefully someone could shed some light.

I have run the following command:

Robocopy "source_location" "destination_location" /E /COPYALL /MT:8 /DCOPY:DAT /XO /R:10 /W:5 /V /ETA /LOG+:robocopy_01.txt /TEE

When it finished, it says that it copied everything, but when I checked the destination folder, it had 10 directories missing and about 10GB of files missing.

Any ideas what on this issue?

I have run the script as an admin.

12 Spice ups

Does the account you are using have access to these folders?

9 Spice ups

Yes, is a Domain Admin account.

4 Spice ups

Domain admin account does not necessary mean it have rights to access the sub-folders and/or files ?
In some cases, users or Domain accounts in the local backup operators group can have access to backup (read but not open) and/or access to restore files, but I have read from somewhere that you might need a 3rd party solution and it may not work with copy (xcopy, robocopy etc) as it may require VSS or other technologies.

In some cases, users who have “full rights” might even set “deny” to certain files and/or folders as they think they only want certain people to have access.

13 Spice ups

As Adrian said, a DA does not automatically have permissions to all folders, hence me asking to confirm you have access.

Go in to the folder, if you are prompted for access, then you do not have access until you’ve been in it.

10 Spice ups

Thank you for your advice. I will go and double-check the permissions and will come back with an update.

6 Spice ups

I can’t help but think it may be related to the included /XO switch. Perhaps part of a file structure was restored in the original source, making it older than the destination.
If it were me, I would find a specific file that it is not copying based on the log output, and try to focus on testing the command against that specific file or directory. You may want to play around with testing /zb as a switch as well.

All the best.

10 Spice ups

I second (third?) this. Had it happen myself in the last week or so when setting up file server monitoring. Domain Admin account could see 99% but was denied access on a single network share.

8 Spice ups

I’m going to echo this. That script should be outputting both to the log and to the console, and Robocopy has really good logging. It should tell you the reason it skipped a directory if it can see it. If it can’t see it, then that’s also a problem. :slight_smile:

6 Spice ups

I for sure would be questioning the /xo switch. Purposely excluding items is going to be the primary reason that source and destination don’t align.

Next I’d investigate use of the /b or /zb switch to use backup mode if a file is open/locked.

Regardless, the reason is going to be logged. Start looking for error messages in there.

5 Spice ups

Hey @Nuno85

I’ve run into robocopy dropping files before—it usually comes down to a couple of things. Here’s how I’d dig in:

Check the log

  • Open robocopy_01.txt and peek under “Skipped” or “Extras
  • Look for error codes (like “access denied” or “path too long”)

Rethink /XO

  • That switch skips files older than what’s already at the destination
  • If you ran part of this job before, timestamps on the destination could be newer, so robocopy quietly ignores them

Try backup mode for tricky permissions

  • Even admin rights can stumble over inherited ACLs
  • Add /B or /ZB so robocopy falls back to backup mode and skips past permission roadblocks

Give that a shot and see if those missing folders pop back in.

7 Spice ups

You might be running afoul of the permissions for which a few others have commented. If you are copying NTFS Sec Info, you can have issues with ‘Take Ownership’ permission on the share. Also, if the source folder’s owner is set to a group rather than a user. Two options - User /ZB to use backup mode for those it cannot copy otherwise. Otherwise - /COPY:DATS instead.

3 Spice ups

Thank you for everyone’s suggestions, yes it seems to be permissions and not sure why I never though of that, but anyway thank you everyone.

3 Spice ups

To clarify, permissions?

You’ve marked the best answer as the switches / commands, so i want to clarify, because other people having the same issues in the future may need to know more specifically.

I’m not trying to remove the BA just clarify what the fix was, as it’s unclear. You say permissions but your BA suggests otherwise.

4 Spice ups