Solved

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

Posted on 2013-12-30
3
393 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 29

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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Suggested Solutions

A procedure for exporting installed hotfix details of remote computers using powershell
This article explains how to install and use the NTBackup utility that comes with Windows Server.
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 new Backup Exec 2012 server and move an existing database to that server with the use of the BEUtility. Install Backup Exec 2012 on the new server and apply all of the latest hotfixes and service packs. The…

726 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