Solved

Access denied when copying over \home\%username% directories using Robocopy

Posted on 2013-12-30
3
382 Views
Last Modified: 2013-12-30
I am trying to copy over redirect profile directories \home\%username% from a 2008 Server R2 to a CIFShare on a NAS using Robocopy while applying the /e switch.  Everything copies ok except for folders that have the lock sign over the folder.  When trying to copy these the program echoes "access denied wait 30 seconds" and just repeats indefinitely. I realize these are currently being used by other users.
My question is does Robocopy have a switch or function in it that will allow these type of files/folders to be copied regardless of being in use or locked?

thank you
0
Comment
Question by:Matt_Kennedy
3 Comments
 
LVL 17

Expert Comment

by:pjam
ID: 39746889
I am not a Robocopy user, but in my humble opinion you definitely do not want to try and copy an open or locked file. Most like will cause corruption to the file.
0
 
LVL 28

Accepted Solution

by:
serialband earned 500 total points
ID: 39747303
Robocopy can't copy files or folders that are in use.  If you use robocopy, you'll need to work around that by just running more frequent robocopies and set the retry and warnings to a much lower number.  I usually set them to 1 so I can more easily spot the errors and bypass the wait.

robocopy e:\home\%username%  f:\home\%username% /w:1 /r:1 /copyall /mir


You can run robocopy later and it will quickly pick up the missed files.

Also, robocopy runs as the user running the command.  You should probably do a runas /User:Administrator if you want access.  Unfortunately, some users remoev administrator access, so you may still have to add it back.

Assuming you have files that stay permanently inuse, this work around won't help you.  If you don't want to wait for the inuse files, you can use an open sourced 3rd party tool called hobocopy and turn on Volume Shadow Copy (VSS).  Hobocopy makes use of the shadow copy to copy files that are inuse, bypassing the limitation.  You will be getting an older copy of the file, but at least you'll get the file.  http://hobocopy.sourceforge.net/
0
 

Author Closing Comment

by:Matt_Kennedy
ID: 39747413
Thank you serialband.   That did the job!
0

Featured Post

Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Can't install Citrix Receiver anymore 10 72
2003 File Server upgrade 11 55
SBS2008 c:\ drive toosmall 64 66
Big Problem with Redirected Folder 8 13
INTRODUCTION The purpose of this document is to demonstrate the Installation and configuration of the Data Protection Manager product. Note that this demonstration was prepared on the basis of Windows OS is 2008 R2 and DPM 2010. DATA PROTECTI…
Restoring deleted objects in Active Directory has been a standard feature in Active Directory for many years, yet some admins may not know what is available.
This tutorial will walk an individual through the steps necessary to install and configure the Windows Server Backup Utility. Directly connect an external storage device such as a USB drive, or CD\DVD burner: If the device is a USB drive, ensure i…
This tutorial will show how to configure a single USB drive with a separate folder for each day of the week. This will allow each of the backups to be kept separate preventing the previous day’s backup from being overwritten. The USB drive must be s…

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

27 Experts available now in Live!

Get 1:1 Help Now