Link to home
Start Free TrialLog in
Avatar of operationsIT
operationsIT

asked on

Robocopy exclude command (/XD) not working for me....

Hello EE,

I am working on a network drive migration task and all has been going well with this command which will copy source to the destination and keep all the permissions\ACLs intact and gives me a nice log file to review the results. This command does not mess up anything on the source but will mirror it to the destination which is what I want for time being:

robocopy "\source-server\share\folder" "\destination-server\share\folder" /zb /MT:32 /mir /copyall /dcopy:T /V /tee /LOG+:C:\temp\robocopylog.txt /r:0 /w:0

All is well :-) Until I realize that I have tiny window for the final copy before full cutover to the new storage.

Problem: command above is taking close to 31 hours to run for 9TB of data and my cutover time frame is only about 12 hours. I re-run the command every 48 hours to check for changes to the data on source to update the destination and it appears there are millions of small files which are slowing down the copy.

All the data is there just want to keep the destination up to date with new robocopy command and slim down the time without jeopardizing the data or permissions\ACLs.

I have narrowed down a couple folders I could exclude from these subsequent copies to shave down the 31 hours to roughly 9 hours by reviewing the data.

I have been trying out the /XD switch and cannot get it to work.

Here is a example of the /XD added to the command;

robocopy "\source-server\share\folder" "\destination-server\share\folder" /XD \source-server\share\folder-to-exclude /zb /MT:32 /mir /copyall /dcopy:T /V /tee /LOG+:C:\temp\robocopylog.txt /r:0 /w:0

I have also tried;

robocopy "\source-server\share\folder" "\destination-server\share\folder" /zb /MT:32 /mir /copyall /dcopy:T /V /tee /LOG+:C:\temp\robocopylog.txt /r:0 /w:0 /XD \source-server\share\folder-to-exclude

No luck....

Any tips or tricks on what I could try out next?

Thank you
ASKER CERTIFIED SOLUTION
Avatar of operationsIT
operationsIT

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of Mitul Prajapati
Mitul Prajapati
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of operationsIT
operationsIT

ASKER

It was the best option for the question

https://ss64.com/nt/robocopy.html