ROBOCOPY retry option is ignored when deleting files

26 Views Asked by At

We discovered strange issue with robocopy utility.

We use it to synchronize two folders (/MIR). Actual options in log file:

 *.* /S /E /DCOPY:DA /COPY:DAT /PURGE /MIR /NP /R:3 /W:1

As you can see, there is option to retry failed file 3 more times with 1 second delay.

There are few files that had issues. First two had to be removed. They were not. And the ROBOCOPY only tried it once. Why did it not re-try 3 more times based on parameters set?

The third file is new or changed. It did try to copy 3 more times.

How can we make sure all files are retrying 3 more times before giving up?


               10438    D:\vNextDeployments\release\20231212.01\app\bin\

  *EXTRA File         234496    App_Web_atgwques.dll

2023/12/12 08:02:26 ERROR 5 (0x00000005) Deleting Extra File \D2SVWEB0001\wwwroot\app\bin\App_Web_atgwques.dll Access is denied.

  *EXTRA File         104960    App_Web_cmfc0b5h.dll

2023/12/12 08:02:26 ERROR 5 (0x00000005) Deleting Extra File \D2SVWEB0001\wwwroot\app\bin\App_Web_cmfc0b5h.dll Access is denied.

    New File           83968    App_Web_8875f17a.dll

2023/12/12 08:02:26 ERROR 5 (0x00000005) Copying File D:\vNextDeployments\release\20231212.01\app\bin\App_Web_8875f17a.dll Access is denied.

Waiting 1 seconds... Retrying... New File 83968 App_Web_8875f17a.dll 2023/12/12 08:02:27 ERROR 5 (0x00000005) Copying File D:\vNextDeployments\release\20231212.01\app\bin\App_Web_8875f17a.dll Access is denied.

Waiting 1 seconds... Retrying... New File 83968 App_Web_8875f17a.dll 2023/12/12 08:02:28 ERROR 5 (0x00000005) Copying File D:\vNextDeployments\release\20231212.01\app\bin\App_Web_8875f17a.dll Access is denied.

Waiting 1 seconds... Retrying... New File 83968 App_Web_8875f17a.dll 2023/12/12 08:02:29 ERROR 5 (0x00000005) Copying File D:\vNextDeployments\release\20231212.01\app\bin\App_Web_8875f17a.dll Access is denied.

ERROR: RETRY LIMIT EXCEEDED.

                  26    D:\vNextDeployments\release\20231212.01\app\bin\en-AU\

0

There are 0 best solutions below