Link to home
Start Free TrialLog in
Avatar of girbot
girbot

asked on

Robocopy: Error 5 Copying NTFs Security

I'm trying to use Robocopy, at home, as a way of backing all my files up to both a server and a lacie nas (link to is below). I have included the full batch file below as well.The server is MS2003, and the PC is Windows XP. I run the batch file from the PC which has write permisison to both shares.

http://www.lacie.com/uk/products/product.htm?pid=11072

I have no problems with the PC>Server, but  I receive the error below from PC/Server>NAS:

2009/01/24 12:18:30 ERROR 5 (0x00000005) Copying NTFS Security to Destination Directory J:\Music\
Access is denied.

I intially had /SEC there but removed it to see if it would help.

Robocopy creates the folders but not the files itself.

The NAS is using the file system XFS.

Any ideas on how to get Robocopy to copy the files across?
ROBOCOPY "J:\Music" "\\Server\\Music" /MIR /COPYALL /E /SEC /ZB /R:2 /W:5 /LOG:"J:\Back up stuff\RCLogs\Music1.txt" /NFL /NDL /NP
 
ROBOCOPY "J:\Music" "\\NAS\share\Music" /MIR /COPYALL /E /ZB /R:4 /W:30 /LOG:"J:\Back up stuff\RCLogs\Music2.txt" /NFL /NDL /NP
 
ROBOCOPY "J:\Photographs" "\\NAS\\share\Photographs" /MIR /COPYALL /E /ZB /R:4 /W:30 /LOG:"J:\Back up stuff\RCLogs\photos1.txt" /NFL /NDL /NP
 
ROBOCOPY "J:\Photographs" "\\Server\share\Photos"/MIR /COPYALL /E /SEC /ZB /R:4 /W:30 /LOG:"J:\Back up stuff\RCLogs\photos2.txt" /NFL /NDL /NP
 
ROBOCOPY "\\Server\Share2\Video" "\\NAS\share\Video" /MIR /COPYALL /E /ZB /R:4 /W:30 /LOG:"J:\Back up stuff\RCLogs\videos.txt" /NFL /NDL /NP

Open in new window

Avatar of mlongoh
mlongoh
Flag of United States of America image

If you just want to get the files copied, you shouldn't need the /SEC switch, in fact all you should need is:
ROBOCOPY "J:\Music" "\\Server\\Music" /MIR /R:2 /W:5 /LOG:"J:\Back up stuff\RCLogs\Music1.txt"

The /MIR switch makes the source and destination match (so let's say you're making your 2nd backup, the 2 days after you've made your first, the /MIR switch will make sure that any files that you deleted in the source will be removed from the destination as well).

You can optionally include the  /NFL /NDL /NP to control the status and logging output.
robocopy.doc
Avatar of girbot
girbot

ASKER

I have already tried removing /SEC with no luck. I think the issue is around the different format of the Lacie hard drive.

Sync toy works but I would prefer robocopy due to ease of scheduling and batch files.
ASKER CERTIFIED SOLUTION
Avatar of mlongoh
mlongoh
Flag of United States of America 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 girbot

ASKER

Sure, I will try that tonight and let you know.

Makes sense about the /COPYALL switch should have thought of that!
Avatar of girbot

ASKER

ROBOCOPY "J:\Music" "\\NAS\share\Music\" /MIR /E /R:4 /W:30 /LOG:"J:\Back up stuff\RCLogs\NEWMusicjizzy.txt" /NFL /NDL /NP

Tried that and the files are copying across. Seems a little slower than I thought it would be, but I guess that's down to the Lacies NIC and write speed.

Last question =] Is the line above still an incremental backup? Or do I need the /M switch?

Robocopy be default will only copy newer files - so it compares each file's size and time stamps (and probably attributes) to determine if a copy is needed.

The MIR option keeps everything in sync, so if you delete from the source, it will get deleted from the target the next time you run it.  I suppose the /M switch might speed up the process if it skips looking at anything that does NOT have the archive attribute set.  I've never experimented with that one.  My suggestion is try it and find out.

I'm glad you got past the error.