Link to home
Start Free TrialLog in
Avatar of hgj1357
hgj1357

asked on

Robocopy

I am using robocopy to mirror a Windows volume to a Linux volume.  I'm having a snag with file attributes.

Here's my script:

ROBOCOPY  X:\ \\svr4\V1\004-THURSDAY\X\  /E /R:2 /MIR /NP /XO  /NS /NC /NFL /NDL /NJH /XF *.bak *.tmp aquota.user  /XD *"lost+found" *"recycler"  *"_images" /LOG+:\\svr4\V1\Scripts\Mirror_Full_X.LOG

And here's the error:

2012/08/14 10:52:47 ERROR 5 (0x00000005) Changing File Attributes X:\Projects\_FINBLK\
Access is denied.

I don't care about file attributes as I will be the only person with access to the Linux volumes. How do I stop robocopy from trying to transfer attributes?
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
Just a guess: try removing the /MIR switch?
Avatar of hgj1357
hgj1357

ASKER

I want this to mirror the source volume.  Will /copy:dt  affect that?  removing /MIR probably would affect the mirror operation, yes?
SOLUTION
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 hgj1357

ASKER

Using /COPY:DT

I am now getting this error

2012/08/14 13:24:11 ERROR 5 (0x00000005) Copying File X:\Projects\_FINBLK\Hydrant.dwg
Access is denied.
Waiting 30 seconds...

X:\ is the source volume
Is that the first file it's trying to copy (or in other words: can you copy any file at all from the source to the target, in Explorer if necessary)?
If it's just single files where this happens, add /r:0 /w:0 to your command line options.
Avatar of hgj1357

ASKER

OK. I see what has happened. Some of the folders in the destination are now owned by ROOT and I can't access them from my user login. Whats the quickest way to change properties for all folders and sub folders to my user name. (Linux question, I guess.)
Avatar of hgj1357

ASKER

How do I add "LINUX" to the categories that this question posts under?
Avatar of hgj1357

ASKER

OK. I got the Linux bit;

chgrp -R buggaluggs /V1
chown -R buggaluggs /V1

That'll take an hour or two.
Avatar of hgj1357

ASKER

We have a winner:

COPY/DT