Link to home
Start Free TrialLog in
Avatar of Tony Giangreco
Tony GiangrecoFlag for United States of America

asked on

Robocopy Error - Access Denied

Last week I wrote a simple Robocopy script and saved it as Robo3.cmd on my Windows 2003 Ent server. The script is intended to copy the Backup Exec Exchange and bkf files to an attached 2TB USB for off site backup. It worked perfect for three days running as a scheduled Windows task using the domain administrator login and pw for credentials.

Yesterday, I decided to make a master copy of the backup files and replaced the USB drive with a fresh duplicate drive formated as NTFS like the others. After 5 hours of copying files,  it copied the recycle bin and tried copying the System Volume Information which started a continious loop of errors every 30 seconds. How do I stop the recycle bin and System Volume Information from being copied?

Here is that portion of the log file.

        New Dir          0      f:\RECYCLER\
        New Dir          4      f:\RECYCLER\S-1-5-21-1278163717-1751908949-1237765062-500\
          New File                    65      desktop.ini
          New File                 1.3 g      Df5.bkf
          New File                 1.3 g      Df6.bkf
          New File                  4820      INFO2
                         1      f:\System Volume Information\  
2011/04/28 16:30:41 ERROR 5 (0x00000005) Copying File f:\System Volume Information\MountPointManagerRemoteDatabase
Access is denied.

Waiting 30 seconds... Retrying...
ASKER CERTIFIED SOLUTION
Avatar of oBdA
oBdA

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 Tony Giangreco

ASKER

Ok, that worked, but the external USB drive ran out of space before the process could complete. How do i tell Robocopy to stop if it runs out of space?

Here is my script

###
### Capture date info
###
echo %date:~-4,4%
echo %date:~-7,2%
echo %date:~-10,2%
###
set yr=%date:~-4,4%
set mo=%date:~-7,2%
set dy=date:~-10,2%
set f2=%date:~-10,2%-%date:~-7,2%-%date:~-4,4%
###
robocopy.exe f:\ x:\ *.* /E /SEC /NP /COPYALL /XD "F:\Recycler" "F:\System Volume Information" /Log:%fn%
copy %fn% Robo-Today.txt
Avatar of oBdA
oBdA

There's no provision for that. Either leave it running until it has come by the last source file, or kill the process (Ctrl-C in the command prompt).